[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Drupal Menus

Posted on 2011-04-21
5
Medium Priority
?
383 Views
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!
0
Comment
Question by:rgranlund
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:bill30
ID: 35444147
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.
0
 
LVL 7

Author Comment

by:rgranlund
ID: 35444325
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?
0
 
LVL 7

Expert Comment

by:bill30
ID: 35444787
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.
0
 
LVL 4

Accepted Solution

by:
lordrt earned 2000 total points
ID: 35446656
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**
}
0
 
LVL 4

Expert Comment

by:lordrt
ID: 35744191
hope u managed to make it work
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

831 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