[TYPO3] external link in menu, typoscript and typolink.
Christopher Torgalson
bedlamhotel at gmail.com
Thu Jun 26 17:21:36 CEST 2008
Hi,
On Thu, Jun 26, 2008 at 4:23 PM, Andrew Plank
<plankmeister_NO at spam_hotmail.com> wrote:
<snip>
> Hi Christopher,
>
> I tried doing this:
>
> 3 < .default
> 3.field = url # <-Changed this from title
> 3.stdWrap.htmlSpecialChars = 1
> 3.typolink.parameter.dataWrap = {field:title} # <- changed this from url
> 3.typolink.returnLast = url
>
> In the hope that it would simply swap the fields... But no dice. That's
> all I need to be able to do... get typolink to swap the parameters. It
> doesn't work (read: I can't get it to work) even if I do something like
>
> 3.typolink.parameter = http://subdomain.example.com
>
> It feels like I'm SO close to a solution. Looks like I might have to
> investigate the userFunc option of typolink....
What is the problem? You were working from an already fully worked-out
solution. From that mailing list post, you should have needed to
change almost nothing at all…
As for the changes above, sorry but they're nonsensical (how could
providing the contents of the title field ever be the appropriate
value for typolink.parameter?!). In TS you will make yourself insane
if you just randomly switch properties around. The following code
works--I've stripped out anything extraneous, indented the code and
used braces etc (it's much easier to understand if you don't repeat
the same object name over and over):
lib.extUrl = HMENU
lib.extUrl {
1 = TMENU
1 {
expAll = 1
noBlur = 1
wrap = <ul>|</ul>
NO {
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = TEXT
default {
field = title
typolink {
parameter.data = field:uid
}
}
3 < .default
3 {
stdWrap.htmlSpecialChars = 1
typolink {
parameter {
data >
dataWrap = http://{field:url}
}
}
}
}
doNotLinkIt = 1
wrapItemAndSub = <li>|</li>
}
}
}
--
Christopher Torgalson
http://www.typo3apprentice.com/
More information about the TYPO3-english
mailing list