[TYPO3-dev] Value of dynamic name variable typoscript

JoH asenau info at cybercraft.de
Thu Jan 30 19:26:57 CET 2014


Am 30.01.2014 17:42, schrieb gal typo:
> Ok, I'll try to be more accurate :
>
> I generate a rootline. like "Home > My page"
>
> So, in the typo3 backend, I defined for each page an subtitle.  Exemple
> : "lib_mypage" is the subtitle of my_page
>
> And when, I generate the rootline by HMENU, I can get dynamically the
> subtitle of each page by doing : ...CUR.stdWrap.dataWrap = {field:subtitle}
>
> But in fact I want more than the the subtitle, I want a value of
> localclang label relied to the subtitle value text, so I did :
> ...CUR.stdWrap.dataWrap =
> LLL:fileadmin/templates/language/locallang.xml:{field:subtitle}
>
> Unfortunately, I want more than the full path of an label defined in
> locallang, but I need is value!
>
> More clear ?

So you want to replace a certain part of the whole LLL construct with a 
dynamic value of the field subtitle. This can be done by "chaining" 
TypoScript stdWrap methods, which has been introduced in TYPO3 4.5

10 = TEXT
10.data = LLL:fileadmin/templates/language/locallang.xml:{field:subtitle}
10.data.insertData = 1

or

10 = TEXT
10.data.field = subtitle
10.data.wrap = LLL:fileadmin/templates/language/locallang.xml:|

maybe

10 = TEXT
10.dataWrap.field = subtitle
10.dataWrap.wrap = {LLL:fileadmin/templates/language/locallang.xml:|}

Not tested though

Cheers

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com



More information about the TYPO3-dev mailing list