[TASK] Make section index from hidden headers work again 76/24876/9
authorMarc Bastian Heinrichs <typo3@mbh-software.de>
Thu, 17 Oct 2013 17:42:53 +0000 (19:42 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 24 Mar 2014 19:36:46 +0000 (20:36 +0100)
Before version 4.7 you could build up a section index with
links to content elements with hidden headers.
Since version 4.7 elements with a hidden header type are sorted
out for the section index, overriding the extra flag "sectionIndex",
which is especially integrated for this.

This patch adds a extra flag for menu configuration sectionIndex
named "includeHiddenHeaders" to make it possible to re-enable
the behaviour of versions before 4.7.

Resolves: #52928
Related: #31767
Documentation: #53699
Releases: 6.2
Change-Id: Iee7f20cfc317c2b624dfc440811c5edc0a367a1e
Reviewed-on: https://review.typo3.org/24876
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Reviewed-by: Sebastian Fischer
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index b091855..9f1df20 100644 (file)
@@ -1856,7 +1856,7 @@ class AbstractMenuContentObject {
                        if ($this->mconf['sectionIndex.']['type'] !== 'all') {
                                $doIncludeInSectionIndex = $row['sectionIndex'] >= 1;
                                $doHeaderCheck = $this->mconf['sectionIndex.']['type'] === 'header';
-                               $isValidHeader = (int)$row['header_layout'] !== 100 && trim($row['header']) !== '';
+                               $isValidHeader = ((int)$row['header_layout'] !== 100 || !empty($this->mconf['sectionIndex.']['includeHiddenHeaders'])) && trim($row['header']) !== '';
                                if (!$doIncludeInSectionIndex || $doHeaderCheck && !$isValidHeader) {
                                        continue;
                                }