[TYPO3] TS Help: how to get a link to a page up in the rootline?

JoH info at cybercraft.de
Mon Jul 17 16:18:29 CEST 2006


>     I have the following TS in my website template to get the title of
> the parent page. I use that as the header of a menu somewhere else.
>
>   # menu header is title of previous page in rootline
>   20.5 = TEXT
>   20.5 {
>       data = leveltitle : -2
>       wrap = <div class="menu1-level1-no">  | </div>
>     }
>
>     Now I'm trying to create a link to the parent page using the title
> as the link text, rather than just put a label with the page title (as
> in the script above).
>
>     I tried to replace the wrap line in the TS above by the following
> linkWrap:
>
> linkWrap = <div class="menu1-level1-no"><a href="?id={-2}">|</a></div>
>
>     It didn't work because TEXT cObj doesn't support the linkWrap
> property, I suppose.
>
>     So, if anyone would be kind enough to help me, I have two
> questions:
>
> 1) How do I change the above TS to create a link to the parent page,
> instead of just getting its title;
> 2) How do I know which wrap functions can be used in which cObject
> (wrap, allWrap, linkWrap, etc)?

TSref is the place to go.
If it's in the list of properties for the desired element you can use it.

> 3) In section 8.3 of TSRef (see link below), it says TEXT cObj has a
> stdWrap property. Is stdWrap the same as plain wrap property?

No - stdWrap is a set of predefined functions that can be applied to the
content.
Some of them are wraps, others will produce links, format strings or do
other things with it.

In this case typolink is your friend:

20.5 = TEXT
20.5 {
    data = leveltitle : -2
    typolink.parameter.data = leveluid: -2
    wrap = <div class="menu1-level1-no">|</div>
}

Have a look at TSref to get the other possibilities of typolink.
http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/5/8/

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com





More information about the TYPO3-english mailing list