[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/modules/profile/ -> profile-listing.tpl.php (source)

   1  <?php
   2  // $Id: profile-listing.tpl.php,v 1.2 2007/08/07 08:39:35 goba Exp $
   3  
   4  /**
   5   * @file profile-listing.tpl.php
   6   * Default theme implementation for displaying a user and their profile data
   7   * for member listing pages.
   8   *
   9   * @see profile-wrapper.tpl.php
  10   *      where all the data is collected and printed out.
  11   *
  12   * Available variables:
  13   * - $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">
  40    <?php print $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>


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7