root / drupal7 / sites / all / modules / entity / theme / entity.tpl.php @ ba09eb79
1 | 85ad3d82 | Assos Assos | <?php
|
---|---|---|---|
2 | |||
3 | /**
|
||
4 | * @file
|
||
5 | * Default theme implementation for entities.
|
||
6 | *
|
||
7 | * Available variables:
|
||
8 | * - $content: An array of comment items. Use render($content) to print them all, or
|
||
9 | * print a subset such as render($content['field_example']). Use
|
||
10 | * hide($content['field_example']) to temporarily suppress the printing of a
|
||
11 | * given element.
|
||
12 | * - $title: The (sanitized) entity label.
|
||
13 | * - $url: Direct url of the current entity if specified.
|
||
14 | * - $page: Flag for the full page state.
|
||
15 | * - $classes: String of classes that can be used to style contextually through
|
||
16 | * CSS. It can be manipulated through the variable $classes_array from
|
||
17 | * preprocess functions. By default the following classes are available, where
|
||
18 | * the parts enclosed by {} are replaced by the appropriate values:
|
||
19 | * - entity-{ENTITY_TYPE}
|
||
20 | * - {ENTITY_TYPE}-{BUNDLE}
|
||
21 | *
|
||
22 | * Other variables:
|
||
23 | * - $classes_array: Array of html class attribute values. It is flattened
|
||
24 | * into a string within the variable $classes.
|
||
25 | *
|
||
26 | * @see template_preprocess()
|
||
27 | * @see template_preprocess_entity()
|
||
28 | * @see template_process()
|
||
29 | */
|
||
30 | ?>
|
||
31 | <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> |
||
32 | |||
33 | <?php if (!$page): ?> |
||
34 | <h2<?php print $title_attributes; ?>> |
||
35 | <?php if ($url): ?> |
||
36 | <a href="<?php print $url; ?>"><?php print $title; ?></a> |
||
37 | <?php else: ?> |
||
38 | <?php print $title; ?> |
||
39 | <?php endif; ?> |
||
40 | </h2>
|
||
41 | <?php endif; ?> |
||
42 | |||
43 | <div class="content"<?php print $content_attributes; ?>> |
||
44 | <?php
|
||
45 | print render($content); |
||
46 | ?>
|
||
47 | </div>
|
||
48 | </div> |