Issue Feature Closed

#46448Add items for sectionIndex menu where pages loading content from other pages

Christian Finkemeier 03/20/13, 09:40 updated 10/23/17, 21:48

Description

I wanted to display a sectionIndex menu for a page that loads its content from another page via “content_from_pid”. This is not possible yet.

To fix this issue, i added a few lines to the sysext/cms/tslib/class.tslib_menu.php file at line 840:

                $basePageRow=$this->sys_page->getPage($this->id);
                if (is_array($basePageRow))    {
+                    if ($basePageRow['content_from_pid']) {
+                        $allowContentFromPid = isset($this->mconf['sectionIndex.']['content_from_pid.'])
+                            ? $this->parent_cObj->stdWrap($this->mconf['sectionIndex.']['content_from_pid'], $this->mconf['sectionIndex.']['content_from_pid.'])
+                            : $this->mconf['sectionIndex.']['content_from_pid'];
+                        if ($allowContentFromPid) {
+                            $selectSetup['pidInList'] .= ','.$basePageRow['content_from_pid'];
+                        }
+                    }
                    $res = $this->parent_cObj->exec_getQuery('tt_content',    $selectSetup);

It should be nice, if this patch could be applied to further versions of TYPO3.

Reviews 2