[TYPO3] Inserting HTML after every third element

Ron Hall ron at busynoggin.com
Sun Mar 30 00:54:53 CET 2008


Hello,

Just closing off this thread in case anyone does a search on it.

I was able to accomplish what I needed using "split." The code looks  
like this:

whatsGoingOnPromos = COA
whatsGoingOnPromos.10 < styles.content.get
whatsGoingOnPromos.10 {
	select.pidInList =101
	select.begin = 0
	renderObj.stdWrap.wrap = |###SPLITTER###
	}

whatsGoingOnPromos.10.stdWrap.split {
	token = ###SPLITTER###
	cObjNum = |*| 1 || 2 || 3 |*|
	1.current = 1
	1.wrap = |
	2.current = 1
	2.wrap = |
	3.current = 1
	3.wrap = |<div class="promoClear">&nbsp;</div>
	}

Thanks,
Ron



On Mar 26, 2008, at 11:17 AM, Martin Mifsud wrote:

> Hi
>
> I think you want to look at OptionSplit in TSref and also:
>
> http://www.typo3wizard.com/en/articles/explaining-the-content-object.html
>
> The 2nd part.. "OptionSplit and CONTENT objects"
>
> HTH
>
> Martin
>
> -------- Original Message  --------
> Subject: [TYPO3] Inserting HTML after every third element
> From: Ron Hall <ron at busynoggin.com>
> To: TYPO3-english at lists.netfielders.de
> Date: 26/03/2008 14:52
>
>> Hello All,
>>
>> I want to insert some HTML after every third record when rendering
>> content. Basically I need to insert a clearing div. Like this:
>>
>> Record 1
>> Record 2
>> Record 3
>> MY HTML (clearing div)
>> Record 4
>> Record 5
>> Record 6
>> MY HTML (clearing div)
>> Record 7
>> Record 8
>> Record 9
>> MY HTML (clearing div)
>> Record 10
>> Record 11
>> MY HTML (clearing div)
>>
>> Any suggestions on how to do that? Also, the last "MY HTML" is not a
>> big deal. I can insert that another way.
>>
>> Thanks,
>> Ron Hall
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
> -- 
> Martin Mifsud
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list