Drupal 7 Semantic Fields + field.tpl.php override (wondering why field.tpl.php override is not working?)

Drupal 7 Semantic Fields + field.tpl.php override (wondering why field.tpl.php override is not working?)

Today I have a simple hint for you, related to semantic_fields.module and field.tpl.php:

If you are using semantic_fields.module your field.tpl.php template file overrides / theme hook suggestions (https://www.drupal.org/node/1089656) will NOT WORK!

The reason is, that semantic field overrides the default behaviour and uses its own naming convention by prefix.

So prefix your field.tpl.php file by "semantic-field--"... and use the tpl.php file contained in the semantic_fields.module!

For example your tpl.php file originally named "field-app-plattform.tpl.php" now has to be named "semantic-field--field-app-plattform.tpl.php" to work!

I hope this hint saved you a lot of time! :)

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.

Weitere Informationen über Formatierungsoptionen