Controllling Drupal's active/active-trail with duplicate menu items
Posted
by Mark
on Stack Overflow
See other posts from Stack Overflow
or by Mark
Published on 2010-04-16T19:39:27Z
Indexed on
2010/04/16
19:43 UTC
Read the original article
Hit count: 522
I'm developing a site that requires some duplication of links within the menu:
Section A
-- Introduction
-- TestimonialsSection B
-- Introduction
-- TestimonialsTestimonials
-- Section A
-- Section B
So 'Section A > Testimonials' and 'Testimonials > Section A' point to the same node. But regardless of which menu link people use, I want the person to be in Section A.
The problem is that D6 doesn't like duplicate menu items, and it assigns the active and active-trail classes rather unpredictably.
So my thought was to create a placeholder node for each item in the Testimonials menu, and then set the URL to something like "testimonials/redirect/section-a", and then use mod_rewrite to redirect over to "section-a/testimonials".
With this solution, I will have no duplicate paths in the menu. I'm just hoping this doesn't somehow hurt my SEO.
Does anyone know a better solution?
© Stack Overflow or respective owner