I'm using D7. I have a custom content type that I need to relate to the user. The user will set up and maintain this page themselves. i.e. Each user has one page of content for this content type.

When a user profile is viewed though I need to show the relevant page that relates to the the user.

What's the best way of doing this in D7? I'm guessing it's something to do with creating a block view and then using contextual filters. I've managed to get a block view that does this within the preview but I can't get any further than that in terms of linking it to a user profile.

There is the possibility of linking the user name to the content title. In fact if the two were intrinsically linked it would be better. Ideally I would have used the profile 2 module but I'm using location ( doesn't work with users in D7 ) and FiveStar ( doesn't work with users in D7 ).

Any suggestions on where to start looking to solve this would be appreciated.

3 Answers 3


Have a look at the Profile 2 module. It replaces the Content Profile module from Drupal 6 and the profile module that is build into Drupal Core.

  • Hi Oswald, Thanks for the answer. I have got Profile 2 installed but a couple of the features I'm looking to implement - 5 star rating of this page and geolocation proximity search don't work with user profiles from what I've read. Unless somebody knows differently.
    – user2324
    Aug 5, 2011 at 8:50

You could create a node reference on the profile and populate it with an empty node, when the profile is created. Then it's just a matter of theming when it comes to displaying that node on the profile page.

  • Thanks for the answer, I've actually solved this. I'll post how I did it.
    – user2324
    Aug 8, 2011 at 8:44

I've managed to solve this. Here's how I did it.

In Advanced settings:

First, I created a relationship in the view to link the content to the user profile. This was achieved by selecting content:author.

Next I created a contextual filter using this relationship on user:id.

On Page Settings:

I then set the path up to be user/%/content, this allows the user page to bring up the relevant content that the user has posted.

Finally, I created a menu tab on the user menu.

Job done!

Next I need to find a way to ensure that each user can only create one page of the relevant content. Any suggestions?

  • if this is your chosen solution, please mark the answer as accepted for future visitors.
    – Laxman13
    Sep 7, 2011 at 14:01

Your Answer

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

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