1

My theme, Riley, highlights menu item of the page that you're on. (for example). I suspect this is a function of Drupal and not specific to the theme. First question: is this generally true?

If the answer to the first question is no and it is theme specific, then I can try to ask the theme makers the next question. Otherwise, my next question is, when I have multiple menu links that link to the current page, it will highlight the last link. How can I get it to highlight the first link instead? I am comfortable modifying PHP code.

For example, Menu Tab 1 contains link to current page P1 and deep within Menu Tab 2 also contains a link to P1, then it will only highlight the P1 link in Menu Tab 2.

Any thoughts / suggestions would be appreciated!

Setup: Apache 2.2, PHP 5.3, Drupal 7.34, PostgreSQL 9.2

1
  • This seems to be a Drupal internal thing. The theme is using the menu_tree_page_data function that Drupal construct including the active breadcrumb. Not sure if it's a feature or a bug that the active breadcrumb gives the last matching links precedence.
    – janechii
    Commented Jul 7, 2015 at 16:52

1 Answer 1

1

normally this is accomplished via css in the theme, with the active attribute:

li a.ctive {
  ...
}

it is not core functionality. You could look at the different -child pseudo-elements to tweak it, or use some JS, but I think that portion of the question would be off-topic here - you are better off asking on stackoverflow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.