You are here

contactinfo.tpl.php in Contact Info 7

Default theme implementation to display the hcard in a block.

Available variables:

  • $type: Either 'personal' or 'business'.
  • $given_name: The given-name value.
  • $family_name: The family-name value.
  • $org: The name of the business or organization.
  • $tagline: The tagline.
  • $street_address: The street-address value.
  • $extended_address: The extended-address value.
  • $locality: The locality value. In USA, this is the city.
  • $region: The region value. In the USA, this is the state.
  • $postal_code: The postal-code value.
  • $country: The country-name value.
  • $longitude: The longitude value in decimal degrees format.
  • $latitude: The latitude value in decimal degrees format.
  • $longitude_formatted: The longitude value in decimal degrees and decimal minutes format.
  • $latitude_formatted: The latitude value in decimal degrees and decimal minutes format.
  • $phones: An array of phone numbers.
  • $faxes: An array of fax numbers.
  • $email_url: The href for the mailto link.
  • $email: The email address value.

File

contactinfo.tpl.php
View source
<?php

/**
 * @file
 * Default theme implementation to display the hcard in a block.
 *
 * Available variables:
 *
 * - $contactinfo: variable_get('contactinfo', array()).
 *
 * - $type: Either 'personal' or 'business'.
 *
 * - $given_name: The given-name value.
 * - $family_name: The family-name value.
 * - $org: The name of the business or organization.
 *
 * - $tagline: The tagline.
 *
 * - $street_address: The street-address value.
 * - $extended_address: The extended-address value.
 * - $locality: The locality value. In USA, this is the city.
 * - $region: The region value. In the USA, this is the state.
 * - $postal_code: The postal-code value.
 * - $country: The country-name value.
 *
 * - $longitude: The longitude value in decimal degrees format.
 * - $latitude: The latitude value in decimal degrees format.
 * - $longitude_formatted: The longitude value in decimal degrees and decimal
 *   minutes format.
 * - $latitude_formatted: The latitude value in decimal degrees and decimal
 *   minutes format.
 *
 * - $phones: An array of phone numbers.
 * - $faxes: An array of fax numbers.
 *
 * - $email_url: The href for the mailto link.
 * - $email: The email address value.
 */
?>
<div id="<?php

print $id;
?>" class="vcard">

<?php

if ($type == 'personal') {
  ?>
  <div class="fn n">
    <?php

  if ($given_name) {
    ?>
      <span class="given-name"><?php

    print $given_name;
    ?></span>
    <?php

  }
  ?>
    <?php

  if ($family_name) {
    ?>
      <span class="family-name"><?php

    print $family_name;
    ?></span>
    <?php

  }
  ?>

    <?php

  if ($org) {
    ?>
      <div class="org"><?php

    print $org;
    ?></div>
    <?php

  }
  ?>
  </div>
<?php

}
else {
  ?>
  <?php

  if ($org) {
    ?>
    <div class="fn org"><?php

    print $org;
    ?></div>
  <?php

  }
}
?>

<?php

if ($tagline) {
  ?>
  <div class="tagline"><?php

  print $tagline;
  ?></div>
<?php

}
?>

<?php

if ($street_address || $locality || $region || $postal_code || $country) {
  ?>
  <div class="adr">
    <?php

  if ($street_address) {
    ?>
      <div class="street-address"><?php

    print $street_address;
    ?></div>
    <?php

  }
  ?>
    <?php

  if ($extended_address) {
    ?>
      <div class="extended-address"><?php

    print $extended_address;
    ?></div>
    <?php

  }
  ?>
    <?php

  if ($locality) {
    ?>
      <span class="locality"><?php

    print $locality;
    ?></span><?php

    print $region ? ',' : '';
    ?>
    <?php

  }
  ?>
    <?php

  if ($region) {
    ?>
      <span class="region"><?php

    print $region;
    ?></span>
    <?php

  }
  ?>
    <?php

  if ($postal_code) {
    ?>
      <span class="postal-code"><?php

    print $postal_code;
    ?></span>
    <?php

  }
  ?>
    <?php

  if ($country) {
    ?>
      <span class="country-name"><?php

    print $country;
    ?></span>
    <?php

  }
  ?>
  </div>
<?php

}
?>

<?php

if ($longitude || $latitude) {
  ?>
  <div class="geo">
    <abbr class="longitude" title="<?php

  print $longitude;
  ?>"><?php

  print $longitude_formatted;
  ?></abbr>
    <abbr class="latitude" title="<?php

  print $latitude;
  ?>"><?php

  print $latitude_formatted;
  ?></abbr>
  </div>
<?php

}
?>

<?php

if ($phones || $faxes) {
  ?>
  <div class="phone">
    <?php

  foreach ($phones as $phone) {
    ?>
      <?php

    if ($phone) {
      ?>
        <div class="tel"><abbr class="type" title="voice"><?php

      print t('Telephone');
      ?>:</abbr> <?php

      print $phone;
      ?></div>
      <?php

    }
    ?>
    <?php

  }
  ?>
    <?php

  foreach ($faxes as $fax) {
    ?>
      <?php

    if ($fax) {
      ?>
        <div class="tel"><abbr class="type" title="fax"><?php

      print t('Fax');
      ?>:</abbr> <?php

      print $fax;
      ?></div>
      <?php

    }
    ?>
    <?php

  }
  ?>
  </div>
<?php

}
?>

  <?php

if ($email) {
  ?>
    <a href="<?php

  print $email_url;
  ?>" class="email"><?php

  print $email;
  ?></a>
  <?php

}
?>

</div>