benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

Subnavigation on mobiles #1524

Open gmt-it opened 1 month ago

gmt-it commented 1 month ago

Hello,

I have a small problem. I have set up a subpage with subnavigation on the right. The subnavigation is not displayed on mobile devices. Is this intentional or am I making a mistake here?

Screenshots

subnav_01 subnav_02

gmt-it commented 1 month ago

Nobody here uses the backend layouts with subnavigation? It would be nice if someone tested it and tried it out. Has anyone tried using icons in the subnavigation?

olivermeckel commented 1 month ago

In my opinion, the behavior of the navigation is not an error but expected.

The sub-navigation starts at level 1 (second level), originating from its parent element, and displays two levels. It is hidden in the mobile view, but as a fallback, it is also available in the main navigation. The main navigation starts at level 0 (root level) and displays up to three levels. This setup ensures access to all pages in the standard configuration.

If I understand correctly, you are also using the meta navigation in the header, right? This is usually created from either a list or a directory and can only display one level. You can display further levels through the page template with sub-navigation, but there is no configuration provided for the mobile view.

You would need to implement this functionality yourself or extend the current configuration.

gmt-it commented 1 month ago

Hello Oliver.

Thanks for your answer. I thought so. I've now used menu_pages. Unfortunately, the icons stored on the pages aren't displayed there. I'm currently looking for the place where the data is passed on in Bootstrap TypoScript.

olivermeckel commented 1 month ago

ok, so menu_pages don't provide the use of icons out of the box. which bootstrap_package version do you use?

you have to look for something like this in typoscript menu processor:

dataProcessing { 1629202464 = BK2K\BootstrapPackage\DataProcessing\IconsDataProcessor 1629202464 { iconSet.field = nav_icon_set iconIdentifier.field = nav_icon_identifier iconFileFieldName = nav_icon as = icon } }

gmt-it commented 1 month ago

Hello.

I'm using Botstrap package 15 with Typo3 13.4 / 13.2.1. I know about data processing but I can't find the place where this data is passed to MenuPages.html. I'm looking for the Menu definition in setup.typoscript but I'm not at all sure where the DataProcessing has to be inserted and how I can pass the data to MenuPages.html. I still have a lot to learn. :-(

olivermeckel commented 1 month ago

Hi,

yeah, learning is the key! And it will never stop ;-)

Look for the file MenuPages.typoscript in Configuration/TypoScript/ContentElement/Element But be aware, cause you are switching from menus for pagse to menus in content elements.

Maybe it's better to define an additional page template with your own menu processor … So you have more control, flexibility and automation

gmt-it commented 1 month ago

Thanks Oliver.

I copied all the typoscripts that I use in my site package from the bootstrap package. I completely forgot that the script files are also needed for the content elements. I have now imported MenuPages.typoscript into my site set and adapted it and also adapted MenuPages.html in my set. The currently active page is shown as active. I just can't see the icons.

I'm missing something.

In the integrated typoscript, I can see that the data processing is integrated. But in the template, {item.icon} is empty. I'm getting grey hair. ;-)

image MenuPages.typoscript.txt MenuPages.html.txt

olivermeckel commented 1 month ago

Hi,

the IconsDataProcessor is nested wrong.

MenuPages.typoscript.txt

gmt-it commented 1 month ago

Hello Oliver.

Thank you very much. The clamp cost me a lot of hair and hair dye. ;-)

I still have to learn how to debug. Is there anything you can recommend?

You are now my hero. THANKS AGAIN!

Best regards

Guido image

olivermeckel commented 1 month ago

Great to hear!

To check the output in templates, e.g. using TypoScript, the Debug Viewhelper is helpful. Place the code {_all}</f:debug> in your template and you will see what data arrives there in the frontend.

For more have a look in the Debbuging Guide from TYPO3: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Debugging/Index.html

gmt-it commented 1 month ago

Thank you very much, Stephan! I'll take a closer look. Hopefully I'll see any missing brackets... ;-)