Project

General

Profile

Actions

Feature #46448

closed

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

Added by Christian Finkemeier about 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2013-03-20
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
no-brainer
Sprint Focus:

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.

Actions #1

Updated by Nico de Haen about 10 years ago

  • 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

Actions #2

Updated by Christian Finkemeier about 10 years ago

You have to add a boolean configuration flag, to enable this feature. E.g.

1 = TMENU
1 {
  sectionIndex = 1
  sectionIndex.content_from_pid = 1
  ...
}

Actions #3

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27995

Actions #4

Updated by Gerrit Code Review over 9 years ago

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

Actions #5

Updated by Gerrit Code Review over 9 years ago

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

Actions #6

Updated by Gerrit Code Review about 9 years ago

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

Actions #7

Updated by Gerrit Code Review about 9 years ago

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

Actions #8

Updated by Gerrit Code Review almost 9 years ago

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

Actions #9

Updated by Gerrit Code Review almost 9 years ago

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

Actions #10

Updated by Gerrit Code Review almost 9 years ago

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

Actions #11

Updated by Gerrit Code Review almost 9 years ago

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

Actions #12

Updated by Gerrit Code Review almost 9 years ago

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

Actions #13

Updated by Nico de Haen almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF