[TYPO3-templavoila] Get total number of sections

Tolleiv Nietsch info at tolleiv.de
Mon Mar 12 09:53:33 CET 2012


Hi,

can be found in the manual too: 
http://typo3.org/documentation/document-library/extension-manuals/templavoila/1.6.1/view/1/6/#id2617405 
.... there's a "sectionIsLastItem" register which might be much more 
what you're looking for.

Cheers,
Tolleiv

Matthias schrieb:
> You wouldn't be able to count the sections with RECORDS. It's just XML inside of tt_content.tx_templavoila_flex.
>
> BUT! I finally found the answer and I'm not sure why I haven't seen it before. I swear, I googled high and low!
>
> TemplaVoila has it built in; here it is: http://blog.tolleiv.de/2009/11/templavoila-1-4-released/
>
> See item 5) in his list. Boils down to:
>
> 10 = TEXT
> 10.value = (last item)
> 10.if.equals.data = register:tx_templavoila_pi1.sectionPos
> 10.if.value.data = register:tx_templavoila_pi1.sectionCount
>
> Hope this helps others searching for it!
>
>
> Am Freitag, 9. März 2012 um 21:19 schrieb Kay Strobach:
>
>> Hi Matthias,
>>
>> take a look into LOAD_REGISTER, use e.g. RECORDS inside to count the
>> sections and then you have your needed number.
>>
>> ;) - not an easy, but an solveable task ;)
>>
>> Regards
>> Kay
>>
>> Am 09.03.2012 20:27, schrieb Matthias:
>>> Hey Kay, thanks for the prompt answer!
>>>
>>> I of course thought of this. But compare it what? I need to know how many sections there are, but I have no clue how to get that number. :-|
>>>
>>>
>>> Am Freitag, 9. März 2012 um 19:07 schrieb Kay Strobach:
>>>
>>>> Hi Matthias,
>>>>
>>>> use one load_register to count the records and a second with stdwrap
>>>> equals to decide, wether an element is the lastone.
>>>>
>>>> Regards
>>>> Kay
>>>>
>>>> Am 09.03.2012 16:54, schrieb Matthias:
>>>>> Hey folks,
>>>>>
>>>>> first mail here, please bear with me. :-)
>>>>>
>>>>> I know how to index TemplaVoila sections using LOAD_REGISTER et al., also how to find out if I'm at the first section or not. There are plenty of examples out there.
>>>>>
>>>>> What I don't know is how determine when I'm at the last section. I have an FCE which consists of a series of links and I want to give the last link a class, something along the lines of "last-link". (Internet Explorers up to version 8 don't support the CSS :last-child pseudo class and I want a solid way of addressing that last link within my CSS.)
>>>>>
>>>>> Anybody any idea?
>>>>>
>>>>> - Matthias
>>>>
>>>>
>>>>
>>>> --
>>>> http://www.kay-strobach.de - Open Source Rocks
>>>>
>>>> TYPO3 .... inspiring people to share!
>>>> Get involved: http://typo3.org
>>>>
>>>> Answer was useful: https://flattr.com/profile/kaystrobach
>>>> _______________________________________________
>>>> TYPO3-project-templavoila mailing list
>>>> TYPO3-project-templavoila at lists.typo3.org (mailto:TYPO3-project-templavoila at lists.typo3.org)
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-templavoila
>>>
>>
>>
>>
>>
>> --
>> http://www.kay-strobach.de - Open Source Rocks
>>
>> TYPO3 .... inspiring people to share!
>> Get involved: http://typo3.org
>>
>> Answer was useful: https://flattr.com/profile/kaystrobach
>> _______________________________________________
>> TYPO3-project-templavoila mailing list
>> TYPO3-project-templavoila at lists.typo3.org (mailto:TYPO3-project-templavoila at lists.typo3.org)
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-templavoila
>
>
>

-- 
http://twitter.com/tolleiv - http://blog.tolleiv.de



More information about the TYPO3-project-templavoila mailing list