[TYPO3] Nested Content Elements
Tapio Markula
tapio.markula at dnainternet.net
Tue Aug 1 15:42:00 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
Well typo 3.8.1 doesn't support workspaces, could you please put this
$row = $GLOBALS['TSFE']->sys_page->versionOL('tt_content', $row);
as conditional
if(...)
$row = $GLOBALS['TSFE']->sys_page->versionOL('tt_content', ...
you have elsewhere this
$m = get_class_methods('t3lib_BEfunc');
$this->workspaceOL = in_array('workspaceol', $m);
apparenty
if( get_class_methods('t3lib_BEfunc'))
$row = $GLOBALS['TSFE']->sys_page->versionOL('tt_content',...
would be enough if you don't need workspace info elsewhere
More information about the TYPO3-english
mailing list