From ca16cd4037800e7548415161b666048ea37c6dcc Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon <yahgrp@poplarware.com> Date: Wed, 15 Oct 2014 05:47:32 -0700 Subject: [PATCH] =?UTF-8?q?Issue=20#569362=20by=20David=20Hern=C3=A1ndez,?= =?UTF-8?q?=20Jaza,=20effulgentsia:=20Document=20attributes=20template=20v?= =?UTF-8?q?ariables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/modules/block/templates/block.html.twig | 7 ++++--- core/modules/comment/templates/comment.html.twig | 6 ++++-- core/modules/node/templates/node.html.twig | 6 ++++++ core/themes/bartik/templates/block.html.twig | 9 ++++++--- core/themes/bartik/templates/comment.html.twig | 6 ++++-- core/themes/bartik/templates/node.html.twig | 6 ++++++ 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/core/modules/block/templates/block.html.twig b/core/modules/block/templates/block.html.twig index 26801217574e..aa750cb989b5 100644 --- a/core/modules/block/templates/block.html.twig +++ b/core/modules/block/templates/block.html.twig @@ -19,10 +19,11 @@ * - delta: An ID for the block, unique within each module. * - region: The block region embedding the current block. * - content: The content of this block. - * - attributes: HTML attributes for the containing element. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. * - id: A valid HTML ID and guaranteed unique. - * - title_attributes: HTML attributes for the title element. - * - content_attributes: HTML attributes for the content element. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. * - title_prefix: Additional output populated by modules, intended to be * displayed in front of the main title tag that appears in the template. * - title_suffix: Additional output populated by modules, intended to be diff --git a/core/modules/comment/templates/comment.html.twig b/core/modules/comment/templates/comment.html.twig index 87edce793745..801f9a6c5844 100644 --- a/core/modules/comment/templates/comment.html.twig +++ b/core/modules/comment/templates/comment.html.twig @@ -26,8 +26,8 @@ * - status: Comment status. Possible values are: * unpublished, published, or preview. * - title: Comment title, linked to the comment. - * - attributes.class: List of classes that can be used to style contextually - * through CSS. The default values can be one or more of the following: + * - attributes: HTML attributes for the containing element. + * The attributes.class may contain one or more of the following classes: * - comment: The current template type; e.g., 'theming hook'. * - by-anonymous: Comment by an unregistered user. * - by-{entity-type}-author: Comment by the author of the parent entity, @@ -40,6 +40,8 @@ * - title_suffix: Additional output populated by modules, intended to be * displayed after the main title tag that appears in the template. * - content_attributes: List of classes for the styling of the comment content. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. * * These variables are provided to give context about the parent comment (if * any): diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index 37f1bfc1c81a..c08ab7c1faa9 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -39,6 +39,12 @@ * teaser listings. * - node--unpublished: Appears on unpublished nodes visible only to site * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. * - title_prefix: Additional output populated by modules, intended to be * displayed in front of the main title tag that appears in the template. * - title_suffix: Additional output populated by modules, intended to be diff --git a/core/themes/bartik/templates/block.html.twig b/core/themes/bartik/templates/block.html.twig index 7883a094ea39..31a95c073892 100644 --- a/core/themes/bartik/templates/block.html.twig +++ b/core/themes/bartik/templates/block.html.twig @@ -19,10 +19,13 @@ * - delta: An ID for the block, unique within each module. * - region: The block region embedding the current block. * - content: The content of this block. - * - attributes: HTML attributes for the containing element. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. * - id: A valid HTML ID and guaranteed unique. - * - title_attributes: HTML attributes for the title element. - * - content_attributes: HTML attributes for the content element. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main content + * tag that appears in the template. * - title_prefix: Additional output populated by modules, intended to be * displayed in front of the main title tag that appears in the template. * - title_suffix: Additional output populated by modules, intended to be diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig index 7a22fc000cd5..c5c0a7a905bd 100644 --- a/core/themes/bartik/templates/comment.html.twig +++ b/core/themes/bartik/templates/comment.html.twig @@ -26,8 +26,8 @@ * - status: Comment status. Possible values are: * unpublished, published, or preview. * - title: Comment title, linked to the comment. - * - attributes.class: List of classes that can be used to style contextually - * through CSS. The default values can be one or more of the following: + * - attributes: HTML attributes for the containing element. + * The attributes.class may contain one or more of the following classes: * - comment: The current template type; e.g., 'theming hook'. * - by-anonymous: Comment by an unregistered user. * - by-{entity-type}-author: Comment by the author of the parent entity, @@ -39,6 +39,8 @@ * displayed in front of the main title tag that appears in the template. * - title_suffix: Additional output populated by modules, intended to be * displayed after the main title tag that appears in the template. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. * - content_attributes: List of classes for the styling of the comment content. * * These variables are provided to give context about the parent comment (if diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig index c4eddea70d5c..31502069c987 100644 --- a/core/themes/bartik/templates/node.html.twig +++ b/core/themes/bartik/templates/node.html.twig @@ -39,6 +39,12 @@ * teaser listings. * - node--unpublished: Appears on unpublished nodes visible only to site * admins. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - content_attributes: Same as attributes, except applied to the main + * content tag that appears in the template. + * - author_attributes: Same as attributes, except applied to the author of + * the node tag that appears in the template. * - title_prefix: Additional output populated by modules, intended to be * displayed in front of the main title tag that appears in the template. * - title_suffix: Additional output populated by modules, intended to be -- GitLab