[TYPO3] Nested Content Elements

Tapio Markula tapio.markula at dnainternet.net
Tue Aug 1 15:48:39 CEST 2006


Bernhard Kraft wrote:
> Krystian Szymukowicz wrote:
> 
>>Krystian Szymukowicz wrote:
> 
> 
> Thx for pointing this out !!
> 
> Indeed you have an extra parameter in sys_page->getRecordsByField for the ORDER BY value.
> I changed it like below.
> I also added code for workspaces which should work now properly in the FE.
> (when viewing a preview)
> I pointed this out today on the t.german list.
> 
> 
> Index: pi1/class.tx_kbnescefe_pi1.php
> ===================================================================
> --- pi1/class.tx_kbnescefe_pi1.php      (revision 226)
> +++ pi1/class.tx_kbnescefe_pi1.php      (working copy)
> @@ -74,10 +74,11 @@
> 
>         function getContentElements()   {
>                 $showLanguage = ($GLOBALS['TSFE']->sys_language_content==0) ? ' AND sys_language_uid IN (0,-1)' : ' AND sys_language_uid='.$GLOBALS['TSFE']->sys_language_content;
> -               $rows = $GLOBALS['TSFE']->sys_page->getRecordsByField('tt_content', 'pid', $GLOBALS['TSFE']->id, ' AND colPos LIKE \''.$this->cObj->data['uid'].'__%\'');
> +               $rows = $GLOBALS['TSFE']->sys_page->getRecordsByField('tt_content', 'pid', $GLOBALS['TSFE']->id, ' AND colPos LIKE \''.$this->cObj->data['uid'].'__%\'', '', 'sorting');
>                 $storage = array();
>                 if (is_array($rows))    {
>                         foreach ($rows as $row) {
> +                               $row = $GLOBALS['TSFE']->sys_page->versionOL('tt_content', $row);
>                                 $storage[$row['colPos']][] = $row;
>                         }
>                 }
> 
> 
> 
> greets and thanks again,
> Bernhard

Does Typo3.8.1 support $GLOBALS['TSFE']->sys_page->versionOL?
If not could you put
$row = $GLOBALS['TSFE']->sys_page->versionOL('tt_content', $row);


conditional
                         }



More information about the TYPO3-english mailing list