[TYPO3] HELP HELP for 2 columns EXT plz

Aji Johannes aji.yahya at gmail.com
Wed Sep 27 22:41:34 CEST 2006


Aji Johannes schrieb:
> Hello List
> i have this problem i have an  EXT and i want to exend it.
> ok i have 12 records and i want to make 2 column template. this mean 6 
> records in left and 6 records in right column
> this is my code:
> ##############################
> function main($content,$conf){
>     $this->conf=$conf;
>     $this->pi_setPiVarDefaults();
>     //$this->pi_loadLL();
>   $template = 
> $this->cObj->fileResource('typo3conf/ext/abraj/abraj_template.html');
> 
>            $i = 0;
>            $m =1;
>           
>           
>            for($i =1 ; $i < 13 ; $i++){
>                               
>                             $texttext = 
> $this->cObj->data["tx_abraj_abraj_$i"];
>                            
>                               $markerArray["###TEXT###"]= $texttext;
>                              
>              
>               if($m % 2){
>              
>               $subpart= $this->cObj->getSubpart($template,"###LAYOUT1###");
>              
>               }else{
>              
>               $subpart= $this->cObj->getSubpart($template,"###LAYOUT2###");
>              
>               }
>               $m++;
>              
>               $main_subparts = 
> $this->cObj->getSubpart($template,"###MAINLAYOUT###");
>          
>               $content .= 
> $this->cObj->substituteMarkerArray($subpart,$markerArray);
>              
> }
> return $content;
> }
> 
> 
> 
> ###########################
> i want to make LAYOUT1 and LAYOUT2 like this:
> 
> <td>###LAYOUT1###</td><td>###LAYOUT2###</td>
> this for each 12 records.
> 
> any idea plz i want help im sitting for many hours without any success
> 
> 
> plt need your help
> thanks
> 
> Johannes


Oh i have it it was very easy, loool more than few hours, it was only 
thinking error .

i have in each LAYOUT marker <td>###TEXT###</td>

and i build this in the code:

if($i == 12){
   			$content .= 
$this->cObj->substituteMarkerArray($subpart,$markerArray).'</table>';	
   			}else{
   			$content .= $this->cObj->substituteMarkerArray($subpart,$markerArray);
   			}

thanks



More information about the TYPO3-english mailing list