[TYPO3] Using subtitle in template
JoH asenau
info at cybercraft.de
Mon Oct 16 13:56:00 CEST 2006
> Edwin Blokker wrote:
>> I want to use the pages subtitle as a text in my template. I use this
>> typoscript:
>>
>> # subtitle
>> lib.sub = TEXT
>> lib.sub {
>> value = domain.com
>> value.override.field = subtitle
>> value.wrap = domain.com: |
>> }
>>
>> And have tried many variations on this one, but none of them show any
>> result. What am I doing wrong?
>
> You are trying to get subtitle from tt_content but you need pages
> table. So try:
> value.override.data = page:subtitle
"value" doesn't offer stdWrap properties in TEXT elements.
So this is the correct syntax:
lib.sub = TEXT
lib.sub {
value = domain.com
override.field = subtitle
override.wrap = domain.com: |
}
but then you might run into problems since the wrap will make the override
always happen even if the field subtitle is empty so I guess it would be
better to do it like this:
lib.sub = COA
lib.sub {
wrap = domain.com|
10 = TEXT
10.dataWrap = : {field:subtitle}
10.fieldRequired = subtitle
}
HTH
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