Load a different hardcoded menu for different pages
Hi Folks, this has probably been asked before but I'm not sure of the correct terminology to search for the results.
I'm looking to load a specific menu for differen pages - this is like what you can do in Wordpress where you can load a different header.php file for different pages.
You can create Controller in your c# code and a lot of partial views for menu. In the main Layout you will call Controller, which will decide what partial view return to you depends on page where are you now.
Thanks for this - this is a bit beyond my skills!! I ended up just creating a duplicate template for the one page where I need this different menu - probably not the most elegant solution but it works!
Thanks for your help. I will look into this for future projects though.
Load a different hardcoded menu for different pages
Hi Folks, this has probably been asked before but I'm not sure of the correct terminology to search for the results.
I'm looking to load a specific menu for differen pages - this is like what you can do in Wordpress where you can load a different header.php file for different pages.
Any advice will be greatly appreciated.
Darren
Hi Darren,
You can create Controller in your c# code and a lot of partial views for menu. In the main Layout you will call Controller, which will decide what partial view return to you depends on page where are you now.
Thanks
Hello,
This documentation can help with what Alex suggests.
https://our.umbraco.org/documentation/Reference/Mvc/custom-controllers
https://our.umbraco.org/documentation/Reference/Mvc/forms/turorial-child-action
Jeroen
Hi Guys,
Thanks for this - this is a bit beyond my skills!! I ended up just creating a duplicate template for the one page where I need this different menu - probably not the most elegant solution but it works!
Thanks for your help. I will look into this for future projects though.
Cheers
Darren
is working on a reply...