[TYPO3-english] Check with Typoscript if Templavoila "Link field" is set

Loek Hilgersom loek at netcoop.nl
Fri Oct 8 15:45:39 CEST 2010


Op 10/8/10 11:08 AM, Søren Madsen schreef:

 > Thanks for the long write up, Loek :)

You're welcome.

 > After trying to wrap my head around the practicalities of your 
suggestions, I played a bit around with Templavoila, and ended up with 
something much simpler and maintainable (I think). In Templavoila I 
simply created an additional "Not mapped" field 
(field_readonlinelinkfield) - and made this of type "Link field".
 >
 > In my TS I then just simply do this (with your override trick):
 >
 > lib.readonlinelink = TEXT
 > lib.readonlinelink.value = {$readonlinelinktext.da}
 > lib.readonlinelink.typolink {
 >           parameter.data = getIndpEnv:TYPO3_REQUEST_URL
 >           parameter.override.field = field_readonlinelinkfield
 >           title = {$readonlinelinktext.da}
 > }
 >
 > And it works! Thank you so much for your efforts :)

Ah, great. So I also learned something. This was what I would want to 
suggest but I was under the impression that it wouldn't work because of 
this quote in the wiki:

>> "The scope of the TV fields are kind of tricky, the fields are not available from within your normal TStemplate, actually they are only available from the same level (ie. you can not access fields within a section from a field outside of the section) within the TVDS."
>>
>> See [2] for more info
 >>
>> [2] http://wiki.typo3.org/wiki/TemplaVoila

But maybe that's outdated. Good to know, because you're right, this is 
must more maintainable and I will probably use it soon.

Help yourself by helping others :-)

Cheers,
Loek


More information about the TYPO3-english mailing list