Discussion:
[TYPO3-english] external link in menu
Stefan Kaufmann
2014-01-13 19:27:20 UTC
Permalink
Hello,

I have the following typoscript for a menu and it works fine:
(from the introduction package...)


menu = HMENU
menu {
1 = TMENU
1 {
wrap = <ul>|</ul>

NO = 1
NO {
ATagTitle {
field = title
fieldRequired = nav_title
}

wrapItemAndSub = <li>|</li>

stdWrap.htmlSpecialChars = 1
}

}
}


Now I would like to directly link to an external link in the menu (so
that it does not first point to an internal page which is the standard
behaviour when changing the page type to external url...

I have found this script to do it, but I do not know how to combine it
with the above. Can anyone help? Thanks in advance...

Stefan




lib.menu=HMENU
lib.menu{
1=TMENU
1.wrap=<ul>|</ul>
1.NO {
# hier nicht verlinken, ansonsten bekommt man
doppelte <a> tags
doNotLinkIt = 1
wrapItemAndSub=<li>|</li>
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = TEXT
default {
typolink.parameter.field = uid
field = title
stdWrap.htmlSpecialChars = 1
}
# 4 = shortcut
4 = TEXT
4 {
field = title
typolink.parameter.field = shortcut
}
# 3 = external url
3 = TEXT
3 {
field = title
typolink.parameter.field = url
typolink.extTarget.field = target
}

}
}
}
Mikel
2014-01-14 16:28:16 UTC
Permalink
I'm not sure if you need to configure the target in TS.
Maybe you can handle that with a workaround: Change the page type to
"Link to external URL". Within the tab "Behaviour" (page properties) you
can set the target of the link. Try to enter "_blank" in the field "link
target".
Tested with 6.1.X
Mikel
Post by Stefan Kaufmann
Hello,
(from the introduction package...)
menu = HMENU
menu {
1 = TMENU
1 {
wrap = <ul>|</ul>
NO = 1
NO {
ATagTitle {
field = title
fieldRequired = nav_title
}
wrapItemAndSub = <li>|</li>
stdWrap.htmlSpecialChars = 1
}
}
}
Now I would like to directly link to an external link in the menu (so
that it does not first point to an internal page which is the standard
behaviour when changing the page type to external url...
I have found this script to do it, but I do not know how to combine it
with the above. Can anyone help? Thanks in advance...
Stefan
lib.menu=HMENU
lib.menu{
1=TMENU
1.wrap=<ul>|</ul>
1.NO {
# hier nicht verlinken, ansonsten bekommt man
doppelte <a> tags
doNotLinkIt = 1
wrapItemAndSub=<li>|</li>
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = TEXT
default {
typolink.parameter.field = uid
field = title
stdWrap.htmlSpecialChars = 1
}
# 4 = shortcut
4 = TEXT
4 {
field = title
typolink.parameter.field = shortcut
}
# 3 = external url
3 = TEXT
3 {
field = title
typolink.parameter.field = url
typolink.extTarget.field = target
}
}
}
}
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Stefan Kaufmann
2014-01-15 17:37:58 UTC
Permalink
Hi Mikel and List,

Thank you for this suggestion,but it does not solve the issue. Leaving
the field blank (not entering _top or _blank) has the same effect: The
page where the 'external url page' is called first. Only after a second
click the user is forwarded to the external url.

I am looking for a solution on how to include a direct link to an
external url into the menu.


My TS setup for the menu:

menu = HMENU
menu {
1 = TMENU
1 {
wrap = <ul>|</ul>

NO = 1
NO {
ATagTitle {
field = title
fieldRequired = nav_title
}

wrapItemAndSub = <li>|</li>

stdWrap.htmlSpecialChars = 1
}

}
}
Post by Mikel
I'm not sure if you need to configure the target in TS.
Maybe you can handle that with a workaround: Change the page type to
"Link to external URL". Within the tab "Behaviour" (page properties) you
can set the target of the link. Try to enter "_blank" in the field "link
target".
Tested with 6.1.X
Mikel
Post by Stefan Kaufmann
Hello,
stefan raff
2014-01-16 09:11:22 UTC
Permalink
Set a constant with a "extern link" in the backend

Loading...