Bug #95150

Menu content elements: categories not available in frontend

Added by Florian Seirer about 1 month ago. Updated about 1 month ago.

Status:
Rejected
Priority:
Should have
Assignee:
Category:
Fluid Styled Content
Target version:
-
Start date:
2021-09-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I'd like to use menu_pages or menu_subpages to show a sitemap in the frontend.
The pages have categories defined, but the page object in the frontend doesn't list them.
Only the number of defined categories is shown in {page.data.categories}, instead of an array of the defined categories.

Default template (MenuPages.html) with additional debug viewhelpers:

    <f:if condition="{menu}">
        <ul>
            <f:for each="{menu}" as="page">
                <f:debug inline="1" title="Menu object">{page}</f:debug>
                <f:debug inline="1" title="Categories">{page.data.categories}</f:debug>
                <li>
                    <a href="{page.link}"{f:if(condition: page.target, then: ' target="{page.target}"')} title="{page.title}">
                        <span>{page.title}</span>
                    </a>
                </li>
            </f:for>
        </ul>
    </f:if>


Related issues

Related to TYPO3 Core - Feature #82010: DataProcessor to fetch categories + records with the same categoryUnder ReviewJo Hasenau2017-07-31

Actions
#1

Updated by Georg Ringer about 1 month ago

  • Status changed from New to Rejected

The category nor any other relation is currently resolved by fluid or by a data processor.

See #82010 for a possible solution. Therefore I am closing this issue.

As a temporary solution you can use a custom VH like this one from myself https://gist.github.com/georgringer/54046718ee03c6161cca85d419570a1c

#2

Updated by Georg Ringer about 1 month ago

  • Related to Feature #82010: DataProcessor to fetch categories + records with the same category added
#3

Updated by Florian Seirer about 1 month ago

Your ViewHelper solved my problem, with some small changes.

Thank you!

Also available in: Atom PDF