views:

35

answers:

1

I'm using the built-in Path module to change Drupal Page links from a format like "/node/1234" to "/about-us". The latter link format is easier to read and is SEO friendly.

At the top of every page is the primary navigation. Currently when viewing the /about-us page the primary navigation links are displayed as follows:

Home | About Us | Contact Us

Notice that the /about-us page is linking to itself (self-linking). Instead, the primary navigation on the about-us page should look like this:

Home | About Us | Contact Us

Is it possible for Drupal to detect which Page is loaded and then refrain from displaying a link to the current page? A Page should never link to itself.

+1  A: 

You will probably have to get into some custom theme/module development to make this happen unless you can find a third-party module to do this for you (I don't know of any, I'm afraid). I can recommend VanDyk's "Pro Drupal Development" for getting started in that whole world. Then poke around in /includes/menu.inc to get an idea of how the menus are constructed and what theme functions you can override.

Alternately, if Javascript-disabled people aren't too much concern for you, you could always write some quick jQuery (or whatever your preferred tool is) to remove the link from the currently viewed page.

JavadocMD