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 218 posts 556 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 5908 posts 22603 karma points MVP 4x 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 4861 posts 12138 karma points MVP 3x admin c-trib
    Mar 30, 2015 @ 12:04
  • Darren Wilson 218 posts 556 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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies