Default theme implementation to present profile items (values from user account profile fields or modules).
This template is used to loop through and render each field configured for the user's account. It can also be the data from modules. The output is grouped by categories.
for the parent markup. Implemented as a definition list by default. where all items and categories are collected and printed out.
Available variables:
- $title: Field title for the profile item.
- $value: User defined value for the profile item or data from a module.
- $attributes: HTML attributes. Usually renders classes.
See also
template_preprocess_user_profile_item()
File
modules/user/user-profile-item.tpl.phpView source
- <?php
-
- /**
- * @file
- * Default theme implementation to present profile items (values from user
- * account profile fields or modules).
- *
- * This template is used to loop through and render each field configured
- * for the user's account. It can also be the data from modules. The output is
- * grouped by categories.
- *
- * @see user-profile-category.tpl.php
- * for the parent markup. Implemented as a definition list by default.
- * @see user-profile.tpl.php
- * where all items and categories are collected and printed out.
- *
- * Available variables:
- * - $title: Field title for the profile item.
- * - $value: User defined value for the profile item or data from a module.
- * - $attributes: HTML attributes. Usually renders classes.
- *
- * @see template_preprocess_user_profile_item()
- */
- ?>
- <dt<?php print $attributes; ?>><?php print $title; ?></dt>
- <dd<?php print $attributes; ?>><?php print $value; ?></dd>
-
Comments
user-profile-item.tpl.php
I know the documentation states that user-profile-item.tpl.php allows one to override the theming, but this just isn't what I'm seeing. If there's any confusion, the path I'm talking about is /user/uid.
The html in user-profile-item is using dt and dd elements but the actual page being rendered is using divs. I've tried this with the administrative theme and the theme I'm using and it's the same for a logged in or anonymous user.
When I look closely at a users profile page being rendered, I seem to see a slight flash and I imagine I can see content disappearing, perhaps the content I'm putting on user-profile-item or user-profile-category to see what's being rendered.
I can control the rendering with user-profile.tpl.php but it's render method is calling something other than this template. I'd love to know how to track what's being called in the rendering cycle -- is there a way to debug this or see it in a log.
And also just to be clear, I'm copying these user template files from the users module in D7 to my theme's templates folder.
Thanks
having the same problem, this
having the same problem, this is driving me crazy!
The real template used is
The real template used is field.tpl.php,
it seems the documentation was not updated.
This file is only used for the IMHO useless 'summary' profile item.