[Typo3] Using CONTENT obj from PHP

Elmar Hinz elmar.hinz at vcd-berlin.de
Wed May 11 16:08:52 CEST 2005


> Try to make a cObj and use the CONTENT() method from it.
> 
>   $cObj = t3lib_div::makeInstance("tslib_cObj");
>   $conf = array('table' => 'tt_content',
>                 'select.' => array('pidInList' => $pidList,
>                                    'orderBy' => 'sorting')
>           );
>   $renderedContent = $cObj->CONTENT($conf);
> 
> This is the same as the "CONTENT" object in TS, so the configuration
> is the same as described in:
> 
> http://typo3.org/documentation/document-library/doc_core_tsref/CONTENT-1/
> 
> hth alex


Thank you,

Surprisingly I found a possibility to run loops in TS by using the split 
  function.


temp.orderedContent = TEXT
temp.orderedContent {
     value = 172,173,174,175,176,177,225,226
     split {
         token = ,
         cObjNum = 1
         1.10 = CONTENT
         1.10 {
             select {
                 pidInList.current = 1
                 where = colPos = 2
                 languageField = sys_language_uid
             }
         }
     }
}




More information about the TYPO3-english mailing list