[TYPO3-english] TS Typolink returnLast processes shortcut doktypes?

Andrew Plank plankmeister_NO at SPAMhotmail.com
Sat Mar 13 21:50:15 CET 2010


Hi all,

I'm in a situation where I need to generate a link that's relative to 
the 3rd level in the pagetree. Simple enough:

lib.link = TEXT
lib.link {
   typolink.parameter.data = fullRootLine:3,pid
   typolink.returnLast = url
   wrap = <a href="|events">Link</a>
}

However, in the pagetree, all the pages at the 3rd level are shortcuts, 
pointing to the first subpage. Therefore, typolink automatically 
processes this as a direct link to the shortcut target, so instead of 
the output being:

<a href="/level2/level3/events">Link</a> (level 1 is the site root)

it gives:

<a href="/level2/level3/first-subpage/events">Link</a>

Is there a way of getting typolink to ignore shortcut doktypes, or is 
there a way of doing an "explode" equivalent, on the / character, and 
joining back the first two elements, or deleting the last pagepath 
segment returned from typolink?

I tried using split, but it seems it can't process data return from 
typolink.

Here's hoping!

Kind regards,

Andrew Plank


More information about the TYPO3-english mailing list