location.tpl.php in Location 7.3
Same filename and directory in other branches
Template for displaying single location.
6 theme calls to location.tpl.php
- location_handler_field_location_address::render in handlers/
location_handler_field_location_address.inc - Render the field.
- location_update_index in contrib/
location_search/ location_search.module - Implements hook_update_index().
- template_preprocess_locations in ./
location.module - Theme preprocess function for theming a group of locations.
- template_preprocess_search_result_location in contrib/
location_search/ location_search.module - Preprocess for search_result_locatio template.
- theme_location_cck_field_all in contrib/
location_cck/ location_cck.module - Return both an address and a map for an individual item.
File
location.tpl.phpView source
<?php
/**
* @file
* Template for displaying single location.
*/
?>
<div class="location vcard" itemscope itemtype="http://schema.org/PostalAddress">
<div class="adr">
<?php
if (!empty($name)) {
?>
<span class="fn" itemprop="name"><?php
print $name;
?></span>
<?php
}
?>
<?php
if (!empty($street) || !empty($additional)) {
?>
<div class="street-address">
<span itemprop="streetAddress"><?php
print $street;
?></span>
<?php
if (!empty($additional)) {
?>
<span class="additional" itemprop="streetAddress">
<?php
print ' ' . $additional;
?>
</span>
<?php
}
?>
</div>
<?php
}
?>
<?php
if (!empty($city) && !empty($province)) {
?>
<span class="locality" itemprop="addressLocality"><?php
print $city . ', ';
?></span>
<?php
}
elseif (!empty($city)) {
?>
<span class="locality" itemprop="addressLocality"><?php
print $city;
?></span>
<?php
}
?>
<?php
if (!empty($province)) {
?>
<span class="region" itemprop="addressRegion"><?php
print $province_print;
?></span>
<?php
}
?>
<?php
if (!empty($postal_code)) {
?>
<span class="postal-code" itemprop="postalCode"><?php
print $postal_code;
?></span>
<?php
}
?>
<?php
if (!empty($country_name)) {
?>
<div class="country-name" itemprop="addressCountry"><?php
print $country_name;
?></div>
<?php
}
?>
<?php
if (!empty($email)) {
?>
<div class="email">
<abbr class="type" title="email"><?php
print t("Email address");
?>:</abbr>
<span><a href="mailto:<?php
print $email;
?>" itemprop="email"><?php
print $email;
?></a></span>
</div>
<?php
}
?>
<?php
if (!empty($phone)) {
?>
<div class="tel">
<abbr class="type" title="voice"><?php
print t("Phone");
?>:</abbr>
<span class="value" itemprop="telephone"><?php
print $phone;
?></span>
</div>
<?php
}
?>
<?php
if (!empty($fax)) {
?>
<div class="tel">
<abbr class="type" title="fax"><?php
print t("Fax");
?>:</abbr>
<span itemprop="faxNumber"><?php
print $fax;
?></span>
</div>
<?php
}
?>
<?php
// "Geo" microformat, see http://microformats.org/wiki/geo.
?>
<?php
if (isset($latitude) && isset($longitude)) {
?>
<?php
// Assume that 0, 0 is invalid.
?>
<?php
if ($latitude != 0 || $longitude != 0) {
?>
<span class="geo"><abbr class="latitude" title="<?php
print $latitude;
?>"><?php
print $latitude_dms;
?></abbr>, <abbr
class="longitude" title="<?php
print $longitude;
?>"><?php
print $longitude_dms;
?></abbr></span>
<?php
}
?>
<?php
}
?>
</div>
<?php
if (!empty($map_link)) {
?>
<div class="map-link">
<?php
print $map_link;
?>
</div>
<?php
}
?>
</div>
<?php
if (!empty($province_name) || !empty($country)) {
?>
<div class="location-hidden">
<?php
if (!empty($province_name)) {
print $province_name;
}
?>
<?php
if (!empty($country)) {
print strtoupper($country);
}
?>
</div>
<?php
}