nan-guo / Sonata-Menu-Bundle

This bundle provides menu management by sonata admin bundle (compatible with sonata page bundle).
MIT License
10 stars 19 forks source link

How to display the created menu in frontend #12

Closed simbu-g2t closed 3 years ago

simbu-g2t commented 5 years ago

I've installed this menu bundle and it works fine in admin like your snapshots. Now I want to add this menu to sonata page builder's dropdown to display it in frontend. How can I do this? Can you guide me?

FYI : I'm using symfony 4 and below sonata bundles are used in my project.

        "sonata-project/admin-bundle": "^3.51",
        "sonata-project/block-bundle": "^3.17",
        "sonata-project/cache-bundle": "^2.4.2",
        "sonata-project/datagrid-bundle": "^2.5.0",
        "sonata-project/doctrine-orm-admin-bundle": "^3.10",
        "sonata-project/media-bundle": "^3.20",
        "sonata-project/notification-bundle": "^3.6",
        "sonata-project/page-bundle": "^3.11",
        "sonata-project/seo-bundle": "^2.7",

Thanks in advance!

nan-guo commented 4 years ago

Hello, sorry for the late reply, in fact, the logic should be reversed, you should create your page via sonata page bundle, then, create the menu item by linking the page. It allows you to display the menu in the frontend.