Doing my first navigation partial view and am having trouble setting the active class on news and case study items.
page.Name == Model.Name is working for pages on the same level, but not when say viewing a news item and I want the news lising menu tab highlighted. Can't seem to find a way to do this.
MVC Razor nav conundrum in V6.1.1
Doing my first navigation partial view and am having trouble setting the active class on news and case study items.
page.Name == Model.Name is working for pages on the same level, but not when say viewing a news item and I want the news lising menu tab highlighted. Can't seem to find a way to do this.
I guess it must be possible.
Cheers,
Craig
use this:
Looks good but I get a "The name 'node' does not exist in the current context" error.
Craig
Hi Craig, I would probably go with this:
Let me know if that solves it for you?
Cheers,
Jeavon
Thanks Jeavon,
That works perfectly.
Cheers,
Craig
No worries, glad it works for you.
Hey Craig, you might be interested in this little package I made http://our.umbraco.org//projects/starter-kits/navit-mvc Your questions among others inspired me to create it :-) Hope you might find it useful.
Cheers,
Jeavon
is working on a reply...