7

So I'm confused by the Menu Tabs functionality of Views 3 (Drupal 7 site).

My menu is organized like this:

About-Us => /about-us
--Management => /about-us/management
----Top-Management => /about-us/management/top-management
----Board-of-Directors => /about-us/management/board-of-directors

I have a View setup with two page displays and their paths are: about-us/management/top-managers about-us/management/board-of-directors

I configured the 'top-managers' page display to be a "Default Menu Tab" I configured the 'board-of-directors' page to be a "Menu Tab"

For the Default Menu Tab, I had to provide a Parent Menu Item, so I selected "Normal menu item". I also tried "Already Exists" but that seemed worse.

So.. When I go to about-us/management/top-managers I get the correct page display, and there are tabs at top. When make the 2nd tab active ("Board of Directors"), the path changes correctly and I get the correct page display. But the 1st tab ("Top Management") links to the parent's path (about-us/management) instead of to itself (about-us/management/top-management).

So the 1st tab links to about-us/management and the 2nd tab links to about-us/management/board-of-directors. I want the 1st tab to link to about-us/management/top-managers

How do I get the default menu tab to link to its own path instead of the parent's path? Or am I doing something completely wrong?

5
  • Does quick_tabs module serve your purpose ?
    – Hacker
    Mar 22, 2012 at 8:13
  • Confirmed. I have a similar issue: the default tab always seems to use the parent menu item's path, instead of its own. I guess, what we'd really like, is that the parent menu item required by default tab item, exist only virtually but never be used on its own. Gonna file an issue for that. Apr 21, 2012 at 9:24
  • "So I'm confused by the Menu Tabs functionality of Views 3 (Drupal 7 site).". Don't feel bad about it.
    – cherouvim
    Aug 3, 2012 at 8:38
  • A demystification of the (undoubtedly problematic) tabs feature of views can be found at drupal.org/node/272818#comment-1685540
    – cherouvim
    Aug 29, 2012 at 13:46
  • The procedure for views tabs is different in Drupal 8. See drupal.stackexchange.com/questions/173306/…
    – Jonathan
    Sep 10, 2015 at 17:46

1 Answer 1

2

Check this:

How to add a tab to a Views page:

On the View that you want as the default tab: In the Views ‘page settings’, set the Menu Type as ‘Default Menu Tab’ then click the little setting ‘gear’ and set the ‘parent menu item’ to ‘normal menu item’. Set the path as “/something/tab1″; for example, “/postlist/allposts”

On the View that you want as your second (or 3rd, etc) tab, set the Menu Item Type as ‘Menu tab’. Set the path as “/something/tab2″ for example, “/postlist/newposts”

The key to making the tabs show on the View page is the path setting! All of the pages must have the same parent-path – in the examples above this is “/postlist”. If the parent-paths are not the same, you will never get that damn tab to show up in the View.

For more check the original post

1
  • This is not the point of the problem and the referred post does not solve it. The problem is that the default tab never gets its dedicated, so to say "nested", address. "But the 1st tab ("Top Management") links to the parent's path (about-us/management) instead of to itself (about-us/management/top-management)." A temporary solution is to use Redirect module for the default tabs' URLs with code 307 or 308 (I don't recall now) for a temporary redirect. May 27, 2012 at 11:07

Your Answer

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

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