[TYPO3] Retrieving TS value inside other TS code

Francois Suter fsuter at cobweb.ch
Tue Nov 7 09:14:14 CET 2006


Hi Christopher,

Thanks for your answers, but...

> # 'PIDinRootline' "...changes something with the template, if the
> # page viewed is or is a subpage to" the specified page id:
>
> [PIDinRootline = 15]
> # Page 15 is 'lorem' section:
> lib.someObject.NO.stdWrap2.wrap = <li class="lorem">|</li>
>
> [snip]
>
> Finally, simply from a CSS perspective, it's likely that you'd do
> better to put the special class or id on the body element like this:
>
> <body id="lorem">
>
> ...and style elements in the page this way:
>
> #lorem #menu { ... }

...that won't solve my problem. Knowing which part of the page tree  
the current page belongs to is only part of my needs. What I need is  
to know that information for each page that appears in a menu. Some  
menus will be across branches and each page needs to be identified by  
a bullet with the correct color.

Which is why one solution I can think of, is to add a category field  
to the pages table and retrieve it for each menu item with something  
like

lib.somemenu.1.NO.stdWrap2.dataWrap = <li class="{levelfield:-1,  
category, slide}">|</li>

but this means adding this field in the database and adding the field  
in the list of fields that slide ([FE][addRootLineFields] ), which I  
find more cumbersome than if I could just retrieve some value from  
the template, especially since values set for a page are  
automatically inherited by all subpages.

Any other idea anyone?

Cheers

François Suter
Directeur technique
-----------------------------------------------------
Cobweb Development Sàrl
www.cobweb.ch
-----------------------------------------------------




More information about the TYPO3-english mailing list