[TYPO3] Nested Content Elements

Bernhard Kraft kraftb at kraftb.at
Tue Aug 1 14:11:07 CEST 2006


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
-- 
----------------------------------------------------------------------
"Freiheit ist immer auch die Freiheit des Andersdenkenden"
Rosa Luxemburg, 1871 - 1919
----------------------------------------------------------------------
[[ http://think-open.at | Open source company ]]



More information about the TYPO3-english mailing list