Drupal Menus

Posted on 2011-04-21
Last Modified: 2012-05-11
I'm building a site using Drupal.  I have a main navigation and a custom navigation.  My client wants the Custom navigation menu choice that is active to be another color.  Is there a Drupal Plugin or do I need to write a simple php script?  If it is a php script, can you give me an example of where to start?

Thank you in advance!
Question by:rgranlund
    LVL 7

    Expert Comment

    To change a color of a menu you will need to do some CSS editing.

    Find your CSS file for your theme and add

    #customnavigationtitle a:active {
    background color: #FFFFFF

    Where FFFFFF is the new hexadecimal color code.

    Let me know if you need further clarification.
    LVL 7

    Author Comment

    bill30 thank you for your answer.  I did not explain it far enough though.  There are parent pages and sub-pages.  When a user is on a sub-page they want the Parent page to be active.  

    How is that accomplished?
    LVL 7

    Expert Comment

    You could add some jquery to the site with some basic if/then statements.  If HTML page = ( page 1 or page 2) then CSS menuitem#1 = class active.

    That is not proper coding whatsoever. but you get the idea.
    LVL 4

    Accepted Solution

    You can try use the current_page_parent for this, something like:

    #menus li.current_page_parent a {
          **Whatever you want the highlighted parent to look like**
    LVL 4

    Expert Comment

    hope u managed to make it work

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now