[TYPO3-templavoila] Section Container Index

lee perry leeperry at slack.de
Wed Jun 13 18:18:12 CEST 2007


Hey David,

sorry about this late answer...

I've put this code in the data structure of the extendable FCE.
What do you mean with "an outside typoscript template"?
What do you want to do, exactly?
Do you want to count the sections of one FCE or something else in the 
typoscript of the page?

Greetings,
Lee



> 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