How to make collapsible navigation drawer only for specific item?

CSS Navigation: same code for the menu for different pages, but not linked to self...?

  • Is it possible to use the same code for the navigation menu on different pages and... 1) have the "menu item" for the current page, say get highlighted (or change in some way) 2) ALSO make that item "un-clickable" (remove the <a href></a> tab?) I've seen "tabbed navigation" where there are menu tabs that change depending on what page you are on, and you don't have to change the code and yet the "correct tab" (corresponding to your current page) changes/is highlighted... for example: http://www.kalsey.com/tools/csstabs/ However, I want my site to "remove" the link so that you can't click on a link(menu item) that takes itself to the same page. Is this possible without going through and changing the navigation code for each page? Any code/references would be helpful. Thank you!

  • Answer:

    When I've done this in the past, I've used something like XSSI to check the url of the page I'm on to determine whether or not to write out the link, and which class to use. Because the menus are fairly static and only contain a limited number of items (which is good usability anyway) this was maintainable.

patsup at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

When I've done this in the past, I've used something like XSSI to check the url of the page I'm on to determine whether or not to write out the link, and which class to use. Because the menus are fairly static and only contain a limited number of items (which is good usability anyway) this was maintainable.

dawn

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.