[TYPO3] No tutorials? Draft idea attached...
JoH
info at cybercraft.de
Thu Oct 5 15:25:21 CEST 2006
>>>>> Yeah dmitry - write me a guide to typoscript ifs please fellow
>>>>> expert (after 4 yeasr i just can not wrap my mind around them so
>>>>> that they are dead simple to me - same with the load register ;-)
>>>> I would be happy but... But i will have to drop one of my other
>>>> tasks. This stops me from writing documentation. Though I must say
>>>> that I promised myself that I will never ever release an extension
>>>> without properly written documentation.
>>> I was sort of serious and sort of kidding ;-)
>>>
>>> But in the serious vien - this is one place where I really struggle
>>> to understand and I would love to see 20 pages of examples (the
>>> main way being how to combine ifs and wraps ;-)
>>
>> Well - if you could convince O'Reilly US that there will be a market
>> for an english version of the TYPO3 cookbook you would get exactly
>> this.
>>
>> There is a whole chapter about stdWrap properties with lots of
>> (working) examples.
>
> stdWrap I'm fine, but the if and combining wrap is a problem....
Well - if is a stdWrap property, and you would find a recipe that is
dedicated to "comparing values" only ...
> What would I do if I only wanted to wrap a content item one way when
> the header is set to h3?
You just need a wrap that offers stdWrap properties.
You can use innerWrap, innerWrap2, outerWrap and combinations of them
Example:
10 = COA
10 {
10 = TEXT
10.value = some content
20 = TEXT
20.value = some more content
stdWrap {
innerWrap = MY | WRAP
innerWrap {
if {
value = 3
equals.field = header_layout
}
}
}
}
A more flexible solution might be:
10 = COA
10 {
10 = TEXT
10.value = some content
20 = TEXT
20.value = some more content
stdWrap {
innerWrap.cObject = CASE
innerWrap.cObject {
key.field = header_layout
default = TEXT
default.value = |
3 = TEXT
3.value = MY | WRAP
}
}
}
This way you can have different wraps for each of the header_layout options.
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