Hi.

I wanted to add view pages as tabs to the user's tab menu, something like:

_| view | edit | latest content |_

"latest content" should point to "users//latest".

I set up my view page path to "users/%/latest" and the tab setting is
"menu tab". Argument of the view is "User: Name".

Problem is that no "latest content" tab is showing up when on "user/" and not "view" or "edit" tab is showing up when on "user//latest", while the page is working correctly.

What I'm missing here?

Thanks.
b.

Comments

liliplanet’s picture

Hi Bob,

Try using user/$arg/latest as the page path and select 'make default menu tab'.

Hope this helps ...

bob_hirnlego’s picture

Thanks for the answer.
Views2 doesn't support '$arg' anymore, they replaced it with '%'... anyway, I tried 'default menu tab' but that doesn't work too.

bob

bob_hirnlego’s picture

... this is how it should have been:

I wanted to add view pages as tabs to the user's tab menu, something like:

_| view | edit | latest content |_

"latest content" should point to "users/username/latest".

I set up my view page path to "users/%/latest" and the tab setting is
"menu tab". Argument of the view is "User: Name".

Problem is that no "latest content" tab is showing up when on "users/username" and not "view" or "edit" tab is showing up when on "users/username/latest", while the page is working correctly.

Sorry.

b.

bob_hirnlego’s picture

Can anybody shed some light on this?

Thanks!
b.

bob_hirnlego’s picture

Anyone?

b.

korvus’s picture

I've run into the exact same problem, if someone has an answer for it. Running Drupal 6.6 with Views 6.x-2.1.

In particular, I have a view that shows a user's latest comments when you go to users/username/comments. But I can't get it to show up as a tab from users/username. Is this possible, or do I need to write a module to hook into the menu system correctly? It would seem to be what the Type: Menu Tab option is for, though I suppose it's possible that doesn't work with existing tabs (only sets of tabs created by Views)?

FYI, if I export my view, here's the relevant part where I try to attach it as a tab to users/%/:

$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'users/%/comments');
$handler->override_option('menu', array(
  'type' => 'tab',
  'title' => 'Comments',
  'weight' => '15',
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));
svogel’s picture

I've tried it with Drupal 6.10 and Views 6.x-2.3 and it works like a charm.
Remember that the default user-path (for user-profile) is "/user" not "/users".

Best regards
Stefan