[TYPO3-templavoila] Section Container Index

David Lanier mailinglists at davidlanier.com
Tue Apr 3 19:09:38 CEST 2007


Greetings, Lee,

Thank you for posting your solution.  This sort of code snippet is very 
appreciated, and makes these lists very valuable.

I have a question.  Where did you put this code?  In a typoscript 
template, or in the datastructure?  If in the data structure, do you see 
a way to do this in an outside typoscript template?

kind regards,
David Lanier

lee perry wrote:
> hey dmitry,
> 
> okay, i played with registers and i got it.
> 
> here a solution for a different handling of every SECOND CONTAINER:
> 
> 5 = LOAD_REGISTER
> 5 {
>     myContainer1.cObject = TEXT
>     myContainer1.cObject.data = register:myContainer
>     myContainer1.cObject.wrap = (|+1)%2
>     myContainer.cObject = TEXT
>     myContainer.cObject.data = register:myContainer1
>     myContainer.prioriCalc = intval
> }
> 10 = TEXT
> 10.value = EVERY FIRST CONTAINER
> 10.if {
>     value.data = register:myContainer
>     equals=1
> }
> 20 = TEXT
> 20.value = EVERY SECOND CONTAINER
> 20.if {
>     value.data = register:myContainer
>     equals=0
> }
> 
> 
> thanx and greetings,
> lee
> 
> 
> Dmitry Dulepov schrieb:
>> Hi!
>>
>> lee perry wrote:
>>> i built in a FCE a SECTION with a CONTAINER and now i need the index 
>>> of every NEW CONTAINER by using this FCE.
>>> i can find in the XML in the tt_content tablefield 
>>> 'tx_templavoila_flex' for example 3 NEW CONTAINER:
>>>
>>> <section index="1">...</section>
>>> <section index="2">...</section>
>>> <section index="3">...</section>
>>>
>>> How can i get the information of this index in the typoscript in the 
>>> datastructure of this FCE, maybe for a different handling of every 
>>> second CONTAINER?
>>>
>>> any idea?
>>
>> May be play with registers... But cannot tell anything more specific.
>>


More information about the TYPO3-project-templavoila mailing list