Hello,

I need some pointer/help on the following issue:

I have user profiles at localhost/user/%

Where % is the token provided by the Views module as a context filter to be replaced by the user ID number of the user being viewed.

Each user profile has tabs, such as: Friends, Photos, User Activity, etc. Those tabs are restricted to the user being viewed, i.e.: The "Friends" tab takes the viewer only to the friends of the user being viewed.

I tried to include the items referred to by the tabs into the Navigation Menu but Views won't let me create a menu with the "%" in the path and that is perfectly understandable since the Menu works at a higher level.

Now, how do I create a block that will emulate the Navigation Menu and that has working links to the tabbed items? What token should I use? I have tried all those I could find relating to a user but they don't work. I could create a block through Views and have the % point to a user URL but then I cannot modify the block to add the links!

What I need is to be able to have, say: localhost/user/%/gallery where the % (or any other token) will be automatically replaced by the user ID number. Clicking on this link would take me to the photo gallery of the user being viewed (just like what the tab does now.)

Is this impossible? Or, is there another approach/solution?

Comments

Triumphent’s picture

Sorry did not finish the previous post:

Thank you in advance for all help, pointers, or solutions, you could give me.

Kindest regards.

ben.kyriakou’s picture

Status: Active » Closed (won't fix)

Hi Triumphent. Configuring a view to achieve this is beyond the scope of Pathauto to achieve - if you have to do this using Views I'd suggest adding an issue on the Views issue queue instead. If you're implementing these tabs using hook_menu() then I'd expect these paths to be available already, so this may be worth looking at as a more vanilla solution.

If you'd like extended subpath aliasing with Pathauto, you can achieve this by using the https://www.drupal.org/project/subpathauto module - this will give you aliasing of the sub-paths as well as the main path for the user.

I'm going to mark this as Closed (won't fix) since this doesn't seem like a Pathauto issue. However, if you have further questions feel free to mark it as Active.