You are here

rooms_booking.tpl.php in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

A basic template for room entities

Available variables:

  • $content: An array of comment items. Use render($content) to print them all, or print a subset such as render($content['field_example']). Use hide($content['field_example']) to temporarily suppress the printing of a given element.
  • $title: The name of the room
  • $url: The standard URL for viewing a room entity
  • $page: TRUE if this is the main view page $url points too.
  • $classes: String of classes that can be used to style contextually through CSS. It can be manipulated through the variable $classes_array from preprocess functions. By default the following classes are available, where the parts enclosed by {} are replaced by the appropriate values:

    • entity-profile
    • room-{TYPE}

Other variables:

  • $classes_array: Array of html class attribute values. It is flattened into a string within the variable $classes.

File

modules/rooms_booking/rooms_booking.tpl.php
View source
<?php

/**
 * @file
 * A basic template for room entities
 *
 * Available variables:
 * - $content: An array of comment items. Use render($content) to print them
 *   all, or print a subset such as render($content['field_example']). Use
 *   hide($content['field_example']) to temporarily suppress the printing of a
 *   given element.
 * - $title: The name of the room
 * - $url: The standard URL for viewing a room entity
 * - $page: TRUE if this is the main view page $url points too.
 * - $classes: String of classes that can be used to style contextually through
 *   CSS. It can be manipulated through the variable $classes_array from
 *   preprocess functions. By default the following classes are available, where
 *   the parts enclosed by {} are replaced by the appropriate values:
 *   - entity-profile
 *   - room-{TYPE}
 *
 * Other variables:
 * - $classes_array: Array of html class attribute values. It is flattened
 *   into a string within the variable $classes.
 *
 * @see template_preprocess()
 * @see template_preprocess_entity()
 * @see template_process()
 */
?>
<div class="<?php

print $classes;
?> clearfix"<?php

print $attributes;
?>>
  <?php

if (!$page) {
  ?>
    <h2<?php

  print $title_attributes;
  ?>>
       <?php

  print $title;
  ?>
    </h2>
  <?php

}
?>

  <div class="content"<?php

print $content_attributes;
?>>
    <?php

unset($content['state']);
unset($content['type']);
unset($content['sleeps']);
unset($content['bed_arrangement']);
print render($content);
?>
  </div>
</div>