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.
Possible override templates are:
Futhermore, if you want to load the node in which field is attached, you should use the $element['#object'] entity.
For example, if you want to take the language of the node in which field is attached, you can use the following code <?php $node=$element['#object']; $lang = $node->language; ?>
Possible override templates are:
- field.tpl.php
- field--field-type.tpl.php
- field--field-name.tpl.php
- field--content-type.tpl.php
- field--field-name--content-type.tpl.php
Futhermore, if you want to load the node in which field is attached, you should use the $element['#object'] entity.
For example, if you want to take the language of the node in which field is attached, you can use the following code <?php $node=$element['#object']; $lang = $node->language; ?>
No comments:
Post a Comment