Last updated 11 January 2009. Created on 21 November 2008.
Edited by LeeHunter, kryptik, matt2000. Log in to edit this page.

In a recent project, I've taken upon myself to find ways to let the user control what and how things are displayed on their profile.
Now not being a programmer, I've dived into clever methods of doing this using cck, views, and content_profile.

First create a new content type to use as a profile. (Mines called "Profile")
Now create some basic view blocks. (this can be done by using argument, User:UID, set to pull from url, and check the mark, to get uid from node author)

Here's some of the blocks I use: (These are for public display, viewable when visiting

- My Blogs (Lists a users blogs, latest first)
- My Forum Topics
- My Latest Posts
- My Friends
- My Bookmarks (Lists a users bookmarks)
- My Galleries
- My Photos
- My Main Image (Shows a large image, they've defined as Main)

Now you'd like the user to control which of those blocks show on their profile page. (Perhaps they don't want to show their friends, or bookmarks!)

Okay. Open up your Profile Content type "Profile"
Add a new field:

Block Display | field_block_display | Type=Text | Checkboxes/Radio Buttons

Now give some help text (IE: "Please select the blocks you would like to display on your profile")
Set it to "NOT REQUIRED"
Allow unlimited selections (unless you want to limit the amount of blocks they can use)

Now where it asks for the key|label simply put:

My Blogs|
My Photos|
My Forum Topics|
My Main Photo|

etc, listing all the blocks you want them to have control over.

Once you have all the names inserted save the field, then save your content type.
Go to display and exclude the field on teaser and full node.

Next you need to go into views to each of the views you've already created.

Example open the view that lists the users blogs.

Add Relationship -> Node: Content Profile
- Select the profile that contains the block settings ("Profile in this case")

Add Filter -> Content: field_block_display - Available Values
- Select My Blogs

Update it.

Go to the next view showing forums and do the same thing, filtering to My Forum Topics.

Once you are done all the views, your ready to test it out.

go to your profile, check all the boxes save, then view it.
go back to edit uncheck some display boxes. save then view it.

now your one step closer to end user profile control!

Looking for support? Visit the forums, or join #drupal-support in IRC.