2

I'm looking to display User information on an individual page, pulling custom fields to display the information.

For example, if a visitor of the site come across a user page, it would display:

  • Name (not username)
  • Pictures that they've uploaded
  • An about me paragraph

Maybe a few other custom fields in the future, but the main part is that I need to know how to call these from Drupal.

I'm new to Drupal, but I've worked with Wordpress and Joomla a lot in the past and I'm looking to move onto Drupal, so please, be patronising when you explain!

0

It really depends on how you want to achieve this. Using Panels and Views (as suggested by Dmitry Vyal) you can easily build this without writing a single line of code.

No matter which solution to use, you will need to understand entities (users are entities) and fields (data attached to entities). Both are basic concepts you will find everywhere in Drupal.

If you want to do it in code, you should create a custom module and understand Drupal hooks system. In this nodule, you can declare a page available at a specific by implementing the hook_menu() hook. Since you want to display information from a user on this page, you will need to include %user in your page's path. Combine this with the 'page arguments' property of your menu item to receive the user object as argument of your page handler function (ie/ the 'page callback' property of the menu item).

  • Sounds great, thank-you for the information. I've been having a difficult time with the Drupal documentation, finding where to start on something like this. – Max Chandler Aug 27 '12 at 22:08
0

Probably you should create a panel with two views. One for a general user information and other for stuff like uploaded pictures.

Hope these tutorials will allow you to get started

http://nodeone.se/sv/node/20

http://mustardseedmedia.com/podcast/episode32

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.