This process describes how to override the default user list page layout while using phptemplate based themes and the profile.module. You will see the user list page when you go to any web address followed by ‘profile’ for example –

With the use of this override it is possible for you to control the profile fields that are displayed and you can also control their positioning/layout.

Step 1

Open a text editor like notepad.exe, create a file named template.php with the use of the following snippet. If you already have a template.php file, just add it to your existing one.

Make sure to upload the template.php file to your active theme folder.

Step 2

The template.php snippet catches the default user list page layout before it is displayed and it also looks in the same folder for profile_profile.tpl.php file that determines the new layout.

A very simple example of a profile_profile.tpl.php file maybe illustrated as follows

Here the custom extended fields that are setup are called profile_city, profile_country, profile_postcode

Upload your profile_profile.tpl.php file to your active theme folder and go to your user list page at to view the new layout.

Once the process is complete, you can perform the following functions:

  • Name the classes or change the layout according to your preference.
  • Edit your style.css file or whatever your main style sheet is called in order to control the class styles