0

I'd like to create a profile page (visible for every visitor) for every user on my website. There should be displayed some personal information about the user (name, date of birth, bio...) and some things related to their activity on the website (favorite articles, own articles...).

I've already added a lot of fields to users (wich have to be filled in during the registration) in the People > Account settings > Manage fields section and created some views with the Views module in order to display their favorites etc.

I'm struggling with the next step. I'm not sure whether I should create a profile page myself or use the Profile2 module (wich is installed at the moment). First of all, I don't know how I can create a profile page myself. How can I set this up, assign it to a user...? Secondly, I'm not very convinced by the power of Profiles2: I managed to add fields to a user's profile page, but I can't find a way to add blocks or views to it. A nice feature is the 'private' field option, but I'm wondering if that can't be realised without the module.

Can you help me in finding a good solution?

  • 1
    please try to put 1 question at a time it will be easier in that way to give a better answer. – arpitr Oct 9 '13 at 21:01
  • I agree and I try to do so, but in this case I thought that it would be more difficult for others to help, because they wouldn't see the 'big picture' (the reason for why I'm asking those questions). – Jeroen Oct 9 '13 at 21:07
2

You can consider using Panels module to override the user page.

UPDATE:

You must be knowing default user page has path of form 'user/[uid]'. Now to replace that with our new panels page, visit this link: "admin/structure/pages".

There, you can enable "user_view".

Now when you edit that, you choose layout and content (add the fields). Then when you visit user page at user/[uid], the new layout will take effect.

  • So you mean I should use the Profiles2 page and then use the Panels module to override the 'My main profile' page? How can I do that? – Jeroen Oct 9 '13 at 20:20
  • 1
    no need to have profiles2. Just add the required fields to the user object (like you said you have already done). Then enable the user page in panels, add the fields after choosing layouts. – Neo Oct 9 '13 at 20:23
  • Okay, but how can I assign the page to a user? In other words, how can I make sure that the user is redirected to his/her own profile page when he/she clicks the 'My profile' link? Same question when another user wants to visit someone else's profile page. – Jeroen Oct 9 '13 at 20:33
  • 1
    Jeroen, you dont need to create a new page with user/[uid]. Once you enable 'user_view', that panels layout will take control of the user page. Then in that variant, you will find the tab for 'layout' and add 'contents'. After adding contents and shoosing layout, try to visit any user page and it will render the panels page and not the default one. i strongly suggest you to learn Panels a bit, so that these steps will be easy for you. let me see if I can find some tutorials for you. – Neo Oct 9 '13 at 21:53
  • 1
    youtube.com/watch?v=_VIkE2ZS5oU This shows how to override node view pages, but same concept applies to user page too. – Neo Oct 9 '13 at 21:57
1
  • Create a profile using profile2 module

    http://www.youtube.com/watch?v=jPbazpRCwP0

  • Do you need it here

    I do not think so, what profile 2 module does is it separates user entity with a separate profile entity.Lets consider this with an example you have user on site with name,age fields but the user can have multiple profiles on the basis of Sports, Music so fields on the profile goes in that way. You may have fields like compositions,favourites on music profile for the user and games.. etc. fields on sports profile for the user but name and age will be on the user entity as it is common to both profiles With fields you have mentioned you do not need profile2 module instead panels module will be good for you as neo has suggested before.

  • Make profile private without profile2 module

    Again panels will make it doable.

    https://insready.com/en/blog/3-lines-code-panels3-and-profile-modules-create-user-configurable-privacy-settings

  • User recent activity

    To display the summary of user's recent activity, you can setup a view with a contextual filter of user id, set 'Content pane' display type for your view, and add it to user panel page.

  • Thanks for your help again @arpitr. Your tips will be handy in the future without doubt. – Jeroen Oct 9 '13 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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