Feature #46448
closed
Add items for sectionIndex menu where pages loading content from other pages
Added by Christian Finkemeier over 11 years ago.
Updated almost 7 years ago.
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.
- Target version set to 6.2.0
Hi Christian,
I just have the same problem and I'm trying to migrate your patch to the current master.
But I don't understand how your $allowContentFromPid is implemented. The $this->mconf['sectionIndex']['content_from_pid'] is never set, no matter what configuration I try and so $allowContentFromPid is always NULL.
Can you explain this part? Then I would provide a patch to Gerrit.
regards,
Nico
You have to add a boolean configuration flag, to enable this feature. E.g.
1 = TMENU
1 {
sectionIndex = 1
sectionIndex.content_from_pid = 1
...
}
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27995
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39381
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF