I am thinking of designing users profile page manually. But as a beginner I need your ideas. Can you tell me about what to know all of its variables to design it?

  • What version of Drupal? Have you looked at the drupal.org/project/profile2 module yet? Are you simply trying to theme it, or add custom fields to it? – Johnathan Elmore Aug 23 '12 at 18:02
  • i am using drupal 7 .. i know about it but not use yet... – rakibtg Aug 23 '12 at 18:12
  • 1
    There really are two considerations, what kind of fields will be there, and how you want to theme it. If possible, you should add to your question as many details as you can about what you need help with. – Johnathan Elmore Aug 23 '12 at 18:24
  • I am closing this question because it is too broad to be answered. See the comment left from @JohnathanElmore to understand which information is required to answer this question. – kiamlaluno Dec 4 '12 at 13:58

In order to add your own custom template file, you should create a new file named user-profile.tpl.php in your theme directory.

To see what variables that are available in the template, checkout the default one, that is located under modules/user/user-profile.tpl.php.

Have a look at user profile

| improve this answer | |

Drupal 7 core contains Profile, you can add as many fields as you like to it. Once that is done,

  1. you can use the Panels module, to oevrride the template of user profile page.
  2. Use context and take the user id as argument from the URL, this should make the user object available to the panels.
  3. Now you can add you fields as you want.
  4. You can group them or add them in any layout as per you design using Panels itself.
  5. Write CSS.

The beauty of this approach is it will avoid writing code all you will have to write is CSS.

Cheers, Swarad

| improve this answer | |
  • good idea ...:) – rakibtg Aug 24 '12 at 9:02
  • @Kimi => how can I do step 2 "Use context and take the user id as argument from the URL, this should make the user object available to the panels." Thanks. – Ionut Adrian Luchian Mar 12 '13 at 11:33
  • Panels have configuration for contexts, you can configure all sorts of contexts like node id from URL, user id from logged in user. You can read here for more info planningdrupalsites.com/feeditem/… – Kimi Jan 15 '16 at 7:14

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