You are here

user-profile--search_results.tpl.php in Drupal Commons 7.3

Adaptivetheme implementation to present all user profile data.

This template is used when viewing a registered member's profile page, e.g., example.com/user/123. 123 being the users ID.

Use render($user_profile) to print all profile items, or print a subset such as render($user_profile['user_picture']). Always call render($user_profile) at the end in order to print all remaining items. If the item is a category, it will contain all its profile items. By default, $user_profile['summary'] is provided, which contains data on the user's history. Other data can be included by modules. $user_profile['user_picture'] is available for showing the account picture.

Adaptivetheme variables:

  • $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return TRUE for mobile. Note that tablets are also considered mobile devices. Returns NULL if the feature could not be detected.
  • $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets. Returns NULL if the feature could not be detected.

Available variables:

  • $user_profile: An array of profile items. Use render() to print them.
  • Field variables: for each field instance attached to the user a corresponding variable is defined; e.g., $account->field_example has a variable $field_example defined. When needing to access a field's raw values, developers/themers are strongly encouraged to use these variables. Otherwise they will have to explicitly specify the desired field language, e.g. $account->field_example['en'], thus overriding any language negotiation rule that was previously applied.

Where the html is handled for the group. Where the html is handled for each item in the group.

File

themes/commons/commons_origins/templates/profile/user-profile--search_results.tpl.php
View source
<?php

/**
 * @file
 * Adaptivetheme implementation to present all user profile data.
 *
 * This template is used when viewing a registered member's profile page,
 * e.g., example.com/user/123. 123 being the users ID.
 *
 * Use render($user_profile) to print all profile items, or print a subset
 * such as render($user_profile['user_picture']). Always call
 * render($user_profile) at the end in order to print all remaining items. If
 * the item is a category, it will contain all its profile items. By default,
 * $user_profile['summary'] is provided, which contains data on the user's
 * history. Other data can be included by modules. $user_profile['user_picture']
 * is available for showing the account picture.
 *
 * Adaptivetheme variables:
 * - $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return
 *   TRUE for mobile.  Note that tablets are also considered mobile devices.
 *   Returns NULL if the feature could not be detected.
 * - $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets.
 *   Returns NULL if the feature could not be detected.
 *
 * Available variables:
 *   - $user_profile: An array of profile items. Use render() to print them.
 *   - Field variables: for each field instance attached to the user a
 *     corresponding variable is defined; e.g., $account->field_example has a
 *     variable $field_example defined. When needing to access a field's raw
 *     values, developers/themers are strongly encouraged to use these
 *     variables. Otherwise they will have to explicitly specify the desired
 *     field language, e.g. $account->field_example['en'], thus overriding any
 *     language negotiation rule that was previously applied.
 *
 * @see user-profile-category.tpl.php
 *   Where the html is handled for the group.
 * @see user-profile-item.tpl.php
 *   Where the html is handled for each item in the group.
 * @see template_preprocess_user_profile()
 */

// Hide the flags for printing later.
hide($user_profile['user_actions']);
?>
<article id="user-<?php

print $user->uid;
?>" class="<?php

print $classes;
?>"<?php

print $attributes;
?>>
  <header class="profile-header">
    <?php

print render($user_profile['username']);
?>
    <?php

print render($user_profile['user_picture']);
?>
  </header>
  <div class="profile-content">
    <?php

print render($user_profile);
?>
  </div>
  <?php

print render($user_profile['user_actions']);
?>
</article>