root / drupal7 / modules / profile / profile-listing.tpl.php @ 76597ebf
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Default theme implementation for displaying a user and their profile data
|
6 |
* for member listing pages.
|
7 |
*
|
8 |
* @see profile-wrapper.tpl.php
|
9 |
* where all the data is collected and printed out.
|
10 |
*
|
11 |
* Available variables:
|
12 |
* - $account: User's account object.
|
13 |
* - $user_picture: Image configured for the account linking to the users page.
|
14 |
* - $name: User's account name linking to the users page.
|
15 |
* - $profile: Keyed array of all profile fields that are set as visible
|
16 |
* in member list pages (configured by site administrators). It also needs
|
17 |
* to have a value in order to be present.
|
18 |
*
|
19 |
* Each $field in $profile contains:
|
20 |
* - $field->title: Title of the profile field.
|
21 |
* - $field->value: Value of the profile field.
|
22 |
* - $field->type: Type of the profile field, i.e., checkbox, textfield,
|
23 |
* textarea, selection, list, url or date.
|
24 |
*
|
25 |
* Since $profile is keyed, a direct print of the field is possible. Not
|
26 |
* all accounts may have a value for a profile so do a check first. If a field
|
27 |
* of "last_name" was set for the site, the following can be used.
|
28 |
*
|
29 |
* <?php if (isset($profile['last_name'])): ?>
|
30 |
* <div class="field last-name">
|
31 |
* <?php print $profile['last_name']->title; ?>:<br />
|
32 |
* <?php print $profile['last_name']->value; ?>
|
33 |
* </div>
|
34 |
* <?php endif; ?>
|
35 |
*
|
36 |
* @see template_preprocess_profile_listing()
|
37 |
*/
|
38 |
?>
|
39 |
<div class="profile clearfix"> |
40 |
<?php print $user_picture; ?> |
41 |
|
42 |
<div class="name"> |
43 |
<?php print $name; ?> |
44 |
</div>
|
45 |
|
46 |
<?php foreach ($profile as $field): ?> |
47 |
<div class="field"> |
48 |
<?php print $field->value; ?> |
49 |
</div>
|
50 |
<?php endforeach; ?> |
51 |
|
52 |
</div>
|