MateThemes Posted February 2, 2023 Share Posted February 2, 2023 Hello everyone, this is a general support topic. The last time I often had website templates with mega menu including images. So there this is always an advanced topic for me. I normally used ProcessMenuBuilder but this is not suitable for me anymore. So I want to asked the community, how do you build your menus? With module or whatever. Thanks in advance. 1 Link to comment Share on other sites More sharing options...
Zeka Posted February 2, 2023 Share Posted February 2, 2023 Hi @MateThemes Usually, If I need something simple I use Repeater field with depth option, if something more advanced I use Repeater Matrix field with depth. 3 Link to comment Share on other sites More sharing options...
AndZyk Posted February 3, 2023 Share Posted February 3, 2023 As in my experience the menu usually doesn't change much, except maybe for submenus, I define the navigation in the _init.php and loop through the items and children: $homepage = pages()->get("/"); $nav = $homepage->children("template=foo|bar, sort=sort"); I try to keep the navigation connected to the page tree as close as possible. Link to comment Share on other sites More sharing options...
MateThemes Posted February 3, 2023 Author Share Posted February 3, 2023 47 minutes ago, AndZyk said: As in my experience the menu usually doesn't change much, except maybe for submenus, I define the navigation in the _init.php and loop through the items and children: $homepage = pages()->get("/"); $nav = $homepage->children("template=foo|bar, sort=sort"); I try to keep the navigation connected to the page tree as close as possible. Thank you for your reply and a code example. You are right menu isn't changed. But how you manage if the customer wants complete freedom over navigation? 15 hours ago, Zeka said: Hi @MateThemes Usually, If I need something simple I use Repeater field with depth option, if something more advanced I use Repeater Matrix field with depth. Thank you for your reply. Do you have a code example? Especially how you manage mega menu with an image in the menu? Link to comment Share on other sites More sharing options...
AndZyk Posted February 3, 2023 Share Posted February 3, 2023 27 minutes ago, MateThemes said: But how you manage if the customer wants complete freedom over navigation? If the customer only wants to control the first level, then a page reference field should be enough. If the customer wants to control everything, then maybe a repeater with depth and page reference field should do the trick: https://processwire.com/blog/posts/pw-3.0.44-repeaters/ But I never had this case. Most clients want just rarely changes, which you can update in your code. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now