[TYPO3] Using subtitle in template
Edwin Blokker
a.stoutjesdijk at chello.nl
Mon Oct 16 15:00:45 CEST 2006
Thanks Joey,
I tried both codes, but they both only render the wrap, without the
subtitle. Could there be something else I'm doing wrong??
>> 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
>
More information about the TYPO3-english
mailing list