Details
-
Story
-
Resolution: Fixed
-
Critical
-
5.3-dev, 5.3
-
None
-
Castor Core S2, Castor Core S3, Castor Core S4, Castor Core S5, Castor Core S6
-
4
Description
In the demo bundle, unlike in legacy ezdemo, the sub-menu is not appearing (see the 2nd level in the top menu of http://ezmarketingautomation.com/eng/Shopping).
In order to stick to the Symfony2 standards, and avoid reinventing the wheel, this should be fixed by integrating knplabs/knp-menu-bundle, the dominating solution for menus in Symfony2 projects.
Behaviour
In ezdemo, the top menu was mostly based on:
The feature is actually quite simple. Content types that should show up in menus are whitelisted in MenuContentSettings.TopIdentifierList (menu.ini):
- First level items are whitelisted items below the root location
- Second level items are whitelisted items below the current 2nd level location (if any).
Implementation
A standard KnpMenu builder should make this implementation quite easy. We might wanna use a service instead, but this may actually decrease accessibility of the code with no real improvement.
Future
This implementation will only be made for the DemoBundle at this stage. Based on the experience of this integration, a proper, generic implementation, tied to the Repository Domain model + application, will be designed and implemented, presumably for the next version.