Full ELMS Learning Network documentation
field.tpl.php
×
Error message
User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).- cis7 modules/field/theme/field.tpl.php
- cle7 modules/field/theme/field.tpl.php
- ecd7 modules/field/theme/field.tpl.php
- elmsmedia7 modules/field/theme/field.tpl.php
- harmony7 modules/field/theme/field.tpl.php
- icor7 modules/field/theme/field.tpl.php
- meedjum_blog7 modules/field/theme/field.tpl.php
- mooc7 modules/field/theme/field.tpl.php
field.tpl.php Default template implementation to display the value of a field.
This file is not used and is here as a starting point for customization only.
Available variables:
- $items: An array of field values. Use render() to output them.
- $label: The item label.
- $label_hidden: Whether the label display is set to 'hidden'.
- $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. The default values can be one or more of the
following:
- field: The current template type, i.e., "theming hook".
- field-name-[field_name]: The current field name. For example, if the field name is "field_description" it would result in "field-name-field-description".
- field-type-[field_type]: The current field type. For example, if the field type is "text" it would result in "field-type-text".
- field-label-[label_display]: The current label position. For example, if the label position is "above" it would result in "field-label-above".
Other variables:
- $element['#object']: The entity to which the field is attached.
- $element['#view_mode']: View mode, e.g. 'full', 'teaser'...
- $element['#field_name']: The field name.
- $element['#field_type']: The field type.
- $element['#field_language']: The field language.
- $element['#field_translatable']: Whether the field is translatable or not.
- $element['#label_display']: Position of label display, inline, above, or hidden.
- $field_name_css: The css-compatible field name.
- $field_type_css: The css-compatible field type.
- $classes_array: Array of html class attribute values. It is flattened into a string within the variable $classes.
See also
4 theme calls to field.tpl.php
- date_all_day_date_formatter_dates_alter in sites/
all/ modules/ ulmus/ date/ date_all_day/ date_all_day.module - Implements hook_date_formatter_dates_alter().
- hook_date_formatter_dates_alter in sites/
all/ modules/ ulmus/ date/ date.api.php - Alter the dates array created by date_formatter_process().
- textformatter_contrib_link_field_create_list in sites/
all/ modules/ ulmus/ textformatter/ textformatter_contrib/ textformatter_contrib.module - Link field listing callback.
- views_handler_field::theme in sites/
all/ modules/ ulmus/ views/ handlers/ views_handler_field.inc - Call out to the theme() function, which probably just calls render() but allows sites to override output fairly easily.
469 string references to the theme hook from field.tpl.php
Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.
- accessibility_reporting_report in sites/
all/ modules/ ulmus/ accessibility/ modules/ accessibility_reporting/ accessibility_reporting.module - Report callback. Stores posted data to accessibility_reporting table.
- accessibility_reporting_schema in sites/
all/ modules/ ulmus/ accessibility/ modules/ accessibility_reporting/ accessibility_reporting.install - Implements hook_schema().
- accessibility_reporting_views_data in sites/
all/ modules/ ulmus/ accessibility/ modules/ accessibility_reporting/ views/ accessibility_reporting.views.inc - Implements hook_views_data().
- accessibility_reporting_views_default_views in sites/
all/ modules/ ulmus/ accessibility/ modules/ accessibility_reporting/ views/ accessibility_reporting.views_default.inc - accessibility_views_data in sites/
all/ modules/ ulmus/ accessibility/ views/ accessibility.views.inc - @file Providing extra functionality for views.
File
modules/field/theme/field.tpl.phpView source
- <?php
-
- /**
- * @file field.tpl.php
- * Default template implementation to display the value of a field.
- *
- * This file is not used and is here as a starting point for customization only.
- * @see theme_field()
- *
- * Available variables:
- * - $items: An array of field values. Use render() to output them.
- * - $label: The item label.
- * - $label_hidden: Whether the label display is set to 'hidden'.
- * - $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. The default values can be one or more of the
- * following:
- * - field: The current template type, i.e., "theming hook".
- * - field-name-[field_name]: The current field name. For example, if the
- * field name is "field_description" it would result in
- * "field-name-field-description".
- * - field-type-[field_type]: The current field type. For example, if the
- * field type is "text" it would result in "field-type-text".
- * - field-label-[label_display]: The current label position. For example, if
- * the label position is "above" it would result in "field-label-above".
- *
- * Other variables:
- * - $element['#object']: The entity to which the field is attached.
- * - $element['#view_mode']: View mode, e.g. 'full', 'teaser'...
- * - $element['#field_name']: The field name.
- * - $element['#field_type']: The field type.
- * - $element['#field_language']: The field language.
- * - $element['#field_translatable']: Whether the field is translatable or not.
- * - $element['#label_display']: Position of label display, inline, above, or
- * hidden.
- * - $field_name_css: The css-compatible field name.
- * - $field_type_css: The css-compatible field type.
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
- *
- * @see template_preprocess_field()
- * @see theme_field()
- *
- * @ingroup themeable
- */
- ?>
- <!--
- THIS FILE IS NOT USED AND IS HERE AS A STARTING POINT FOR CUSTOMIZATION ONLY.
- See http://api.drupal.org/api/function/theme_field/7 for details.
- After copying this file to your theme's folder and customizing it, remove this
- HTML comment.
- -->
- <div class="<?php print $classes; ?>"<?php print $attributes; ?>>
- <?php if (!$label_hidden): ?>
- <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div>
- <?php endif; ?>
- <div class="field-items"<?php print $content_attributes; ?>>
- <?php foreach ($items as $delta => $item): ?>
- <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
- <?php endforeach; ?>
- </div>
- </div>
-