From fb1e94ffa5b4e6b2c73f493ba132045fdaff4291 Mon Sep 17 00:00:00 2001 From: t1 Date: 23 Jan, 2015 4:49:58 PM commit diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig index 5fcfd4f..163a54c 100644 --- a/core/modules/system/templates/field.html.twig +++ b/core/modules/system/templates/field.html.twig @@ -7,12 +7,15 @@ * to your theme's directory and customize it, just like customizing other * Drupal templates such as page.html.twig or node.html.twig. * - * For example, for a field named 'body' displayed on the 'article' content - * type, any of the following templates will override this default - * implementation. The first of these templates that exists is used: - * - field--body--article.html.twig - * - field--article.html.twig - * - field--body.html.twig + * @link Instead of overriding the theming for all fields, you can also just + * override theming for a subset of fields using themeable Theme hook + * suggestions @endlink For example,here are some theme hook suggestions + * that can be used for a field_foo field on an article node type: + * - field--node--field_foo--article.html.twig + * - field--node--field_foo.html.twig + * - field--node--article.html.twig + * - field--field_foo.html.twig + * - field--text-with-summary.html.twig * - field.html.twig * * Available variables: diff --git a/core/modules/system/theme.api.php b/core/modules/system/theme.api.php index 0ed5728..0503434 100644 --- a/core/modules/system/theme.api.php +++ b/core/modules/system/theme.api.php @@ -150,6 +150,9 @@ * PLUGIN is the machine name of the particular search plugin type that was * used for the search (such as node_search or user_search). * + * For further information on overriding theme hooks see + * https://www.drupal.org/node/2186401 + * * @section sec_alternate_suggestions Altering theme hook suggestions * Modules can also alter the theme suggestions provided using the mechanisms * of the previous section. There are two hooks for this: the