You are here

organigrams.tpl.php in Organigrams 7

Default theme implementation for 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 (sanitized) entity label.
  • $url: Direct url of the current entity if specified.
  • $page: Flag for the full page state.
  • $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-{ENTITY_TYPE}
    • {ENTITY_TYPE}-{BUNDLE}

Other variables:

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

File

theme/organigrams.tpl.php
View source
<?php

/**
 * @file
 * Default theme implementation for 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 (sanitized) entity label.
 * - $url: Direct url of the current entity if specified.
 * - $page: Flag for the full page state.
 * - $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-{ENTITY_TYPE}
 *   - {ENTITY_TYPE}-{BUNDLE}
 *
 * 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="organigram organigram-<?php

print $organigrams->oid;
?> <?php

print $classes;
?> clearfix"<?php

print $attributes;
?>>
  <?php

if (!empty($content['name'])) {
  ?>
    <h2><?php

  print render($content['name']);
  ?></h2>
    <?php

  hide($content['name']);
  ?>
  <?php

}
?>

  <?php

if (!empty($content['description']['#markup'])) {
  ?>
    <div class="description">
      <p><?php

  print render($content['description']);
  ?></p>
    </div>
    <?php

  hide($content['description']);
  ?>
  <?php

}
?>

  <?php

if (!empty($content['organigram'])) {
  ?>
    <div id="organigram-items-<?php

  print $organigrams->unique_id;
  ?>" class="organigram-items">
      <?php

  print render($content['organigram']);
  ?>
    </div>
    <?php

  hide($content['organigram']);
  ?>
  <?php

}
?>

  <div class="content"<?php

print $content_attributes;
?>>
    <?php

print render($content);
?>
  </div>
</div>