Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Wilson 234 posts 622 karma points
    Mar 30, 2015 @ 11:06
    Darren Wilson
    0

    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

  • Alex Skrypnyk 6148 posts 24077 karma points MVP 8x admin c-trib
    Mar 30, 2015 @ 12:01
    Alex Skrypnyk
    0

    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

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Mar 30, 2015 @ 12:04
  • Darren Wilson 234 posts 622 karma points
    Mar 30, 2015 @ 12:23
    Darren Wilson
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft