Bug #93924
closed
MenuProcessor does not working correctly when doktype folder
Added by Ghanshyam Bhava over 3 years ago.
Updated about 2 years ago.
Description
Hi there,
When we have several page under folder, it is not working correctly. I am trying to have several pages under the specific folder storage and fetch those pages with UID with Menuprocessor.
When you change docktype folder to standard page, it works pretty well.
See Menu structure:
Code:
70 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
70 {
special = list
special.value = 3
levels = 2
as = footerNavigation
expandAll = 1
includeSpacer = 1
titleField = nav_title // title
}
Files
Related issues
1 (1 open — 0 closed)
- Subject changed from Menu with Menuprocessor, handle doktype with creating. to MenuProcessor does not working correctly when doktype folder
- Status changed from New to Needs Feedback
Hi,
have you tried to use special = directory
instead of special = list
?
Yes, I have checked that but it is returning only sub-pages of given UID.
See:
70 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
70 {
special = list
special.value = 3, 8
levels = 2
as = footerNavigation
expandAll = 1
includeSpacer = 1
titleField = nav_title // title
}
Here I have passed special values 3 and 8 which is UID of storage folder. My expected output should be
Array(
'Footer page' => array('abv') // sub pages of selected folder
'Leftpages' => array('testpage') // subpages of selected folder
)
Isn't your goal to show the subpages of Footer Page, i.e. a menu with these items:
- abv
- fsdsdf
- theser
- sdfsdf
- reytrhytr
?
So special = directory
would be ok, am I wrong? Is there something I have not understood?
You almost got my point, But I also want the storage folder name. Output should be:
- Footer page
- abv
- fsdsdf
- theser
- sdfsdf
- reytrhytr
I found the solution, As you said we can change `list` to `directory`. Correct code is as below:
70 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
70 {
special = directory # Change list to directory
special.value.field = 3, 8 # Add .field to value
levels = 2
as = footerNavigation
expandAll = 1
includeSpacer = 1
titleField = nav_title // title
}
This solution works for me :)
Just for the records, I tried also with special = list
and plain TyposScript HMENU and it does not work, too; so the problem is not related to the MenuProcessor. I don't know if the special = list
is not supposed to work with sysfolders by default.
- Status changed from Needs Feedback to Under Review
Hello everybody,
if the option "excludeDoktypes" is NOT set, it is by default to "Be User Section" and "Folder".
If you use set "excludeDoktypes = 6" then your use-case works.
70 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
70 {
special = list
special.value = 3, 8
levels = 2
as = footerNavigation
expandAll = 1
includeSpacer = 1
# only exclude be user section
excludeDoktypes = 6
titleField = nav_title // title
}
I added tests to document this behaviour
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
- Related to Bug #99198: MenuProcessor returns wrong menu added
Also available in: Atom
PDF