[TYPO3] Retrieving TS value inside other TS code
Francois Suter
fsuter at cobweb.ch
Mon Nov 6 17:12:04 CET 2006
Hi all,
This mail's title is probably not very clear. I have a web site
divided into large categories, each of which corresponds to a part of
the page tree. I need each of these "branches" to be tagged by some
keyword that I can use to get specific CSS styles (to visually show
which section of the site the page belongs to).
My initial idea was to do something like this. Define a constant:
CATEGORY = test
use it in the setup as
page.category = {$CATEGORY}
and use it, for example, in the menu as:
lib.somemenu = HMENU
lib.somemenu {
...
1 = TMENU
1 {
...
NO.stdWrap2.dataWrap = <li class="{page:category}">|</li>
}
}
but that was obviously too simple. It seems a property defined with
TS cannot be retrieved that way.
So I thought about using registers, something like:
page.33 = LOAD_REGISTER
page.33.category = {$CATEGORY}
and use it as:
NO.stdWrap2.dataWrap = <li class="{register:category}">|</li>
but that didn't work either.
Of course, I could just add a field to the pages table and retrieve
that field with "levelfield", but I would prefer a strictly TS
solution. Any suggestions welcome.
François Suter
Directeur technique
-----------------------------------------------------
Cobweb Development Sàrl
www.cobweb.ch
-----------------------------------------------------
More information about the TYPO3-english
mailing list