[TYPO3] dynamicly split content elements

Rob De Vries spam_this at pandora.be
Thu May 31 10:18:35 CEST 2007


This is for you, the TS guru,


I have 9 content elemenets in a column and like to show 3 elements in 1 
row on the FE, this devided in 3 rows.

cobject1 | cobject2 | cobject3
-------------------------------
cobject4 | cobject5 | cobject6
-------------------------------
cobject7 | cobject8 | cobject9
-------------------------------


This works almost perfect, every row is wrapped in a div and gets a 
footer div to clear them.
But after the last row, i get another div without the footer div, so my 
page gets broken.

// this get's repeated 3 times: perfect!
<div class="rowcontainer">
	<div class="left">cObject1</div>
	<div class="center">cObject2</div>
	<div class="right">cObject3</div>
	<div class="clearboth"></div>
</div>

// this get's added after the thirth time : no good
<div class="rowcontainer">
	<div class="left">cObject1</div>
</div>


*QUESTION: Why does the last div get's added?*
I just don't see why it get's repeated for the 4th time, because it is 
empty.
if there are no 3 items in 1 row, the last empty row does not get generated.
So any clue on dynamic splitting is more then welcome!


Tnx
Rob




this is the TS:

prodlist = COA
prodlist {

     10 = CONTENT
     10 {
         table = tt_content
         select {
             pidInList = {$3collist-pidInList}
             uidInList = {$3collist-uidInList}
         }

     renderObj = COA
     renderObj {
		
	15 = COA
	15.stdWrap.typolink.parameter.field = image_link
	15 {
	

	5 = IMGTEXT
   	5 {

     		imgList.field = image
    			
     		imgPath = uploads/pics/
     		imgObjNum = 1
			
     	1 {
        		file.import.current = 1
        		file.width.field = imagewidth
        		wrap = |
        		}

     maxW = 170px
     maxWInText = 300
     }
	}
	
	30 = TEXT
	30 {
		field = header
		wrap = <h3> | </h3>
	}

    	40 = TEXT
    	40 {
         field = bodytext
         wrap = <p> | </p>
     }
    	stdWrap.outerWrap = |splitter
    }
   }
}


temp.produktenlist = COA
temp.produktenlist {	
	5 < prodlist
	stdWrap.split {
   	token = splitter
		cObjNum = |*|10||20||30|*|
    		
    		10.current = 1
    		10.wrap = <div class="driecol-wrapper-3col"><div 
class="driecol-container"><div class="driecol-side-a"><div 
class="prod-overzicht-block">|</div></div>	
    		20.current = 1
    		20.wrap = <div class="driecol-content"><div 
class="prod-overzicht-block">|</div></div>
    		
    		30.current = 1
    		30.wrap = <div class="driecol-side-b"><div 
class="prod-overzicht-block">|</div></div><div 
class="driecol-footer">footer</div></div></div>
    }

}






------------------------------------------------------------
web : http://www.rob-ot.be
skype : rob-ot
------------------------------------------------------------
[O_o] -- Don't feed the rob-ot


More information about the TYPO3-english mailing list