Adding links to User's content on their profile

tevih's picture


I am allowing users to create their own content - photo albums, videos, blog, etc - and I am using user relationships nodeaccess to limit access to the user's content to only their friends. I am also using usernode and advanced profile. What I would like to do is have a link to all user's content on their profile page, such as "My Photo Albums" or "My Videos". I'm really stumped on how to add this.

I am using Drupal 5.


You should be able to use

alex.k's picture

You should be able to use views to generate a listing of content. Using user id from the URL as an argument you can restrict content to only that created by the user. As far as separating videos, photos, etc. there are some options:
* use a filter on node type and expose it, so that viewer can choose the type to browse
* create different views for each type
* use node type as another argument in the URL, e.g. user/4/video where video is the name of your content type.

not ideal, but...

tevih's picture

Not ideal, since I'd really rather add it as a tab to the profile, but I suppose I can do it this way. I created a view, and made an argument, User: UID is Author, and nothing shows up. If I get rid of that argument (no argument), then all content is displayed.

Shouldn't UID is Author display all content for the user who's profile we're looking at?

It should. Sounds like the

alex.k's picture

It should. Sounds like the view is not finding the argument value in the URL. In the Page section of the view, your URL should be something like 'user/$arg/videos' or something similar. I'm not very familiar with 5.x views, though, so maybe you should look in views documentation.

Custom tab in the profile is very easy to do in 6.x, but in Drupal 5 you probably need to override the user profile template and add the tab yourself.

Thanks, I got the view to

tevih's picture

Thanks, I got the view to work correctly.

But now, about the tab - how do I go about override the profile template with custom tabs (which includes personalized user tabs, not static pages)?

I have a user_profile.tpl.php for my profile page, but navigation doesn't seem to be happening in there. I'm using panels and panel pages...

Hi I need Help...

chalktherock's picture

Hi I need help accomplishing this same thing, but I require more detailed instruction.
can anyone point me to a tutorial that covers this or guide me through it some?
I Have Drupal 6x

Here. Check this out. Shows

mattwmc's picture

Here. Check this out. Shows how to add a tab to user profile using views. I just did it. Simple!