comparison core/themes/classy/templates/content/node.html.twig @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
13 * field.) 13 * field.)
14 * - node.isPublished() will return whether the node is published or not. 14 * - node.isPublished() will return whether the node is published or not.
15 * Calling other methods, such as node.delete(), will result in an exception. 15 * Calling other methods, such as node.delete(), will result in an exception.
16 * See \Drupal\node\Entity\Node for a full list of public properties and 16 * See \Drupal\node\Entity\Node for a full list of public properties and
17 * methods for the node object. 17 * methods for the node object.
18 * - label: The title of the node. 18 * - label: (optional) The title of the node.
19 * - content: All node items. Use {{ content }} to print them all, 19 * - content: All node items. Use {{ content }} to print them all,
20 * or print a subset such as {{ content.field_example }}. Use 20 * or print a subset such as {{ content.field_example }}. Use
21 * {{ content|without('field_example') }} to temporarily suppress the printing 21 * {{ content|without('field_example') }} to temporarily suppress the printing
22 * of a given child element. 22 * of a given child element.
23 * - author_picture: The node author user entity, rendered using the "compact" 23 * - author_picture: The node author user entity, rendered using the "compact"
24 * view mode. 24 * view mode.
25 * - metadata: Metadata for this node. 25 * - metadata: Metadata for this node.
26 * - date: Themed creation date field. 26 * - date: (optional) Themed creation date field.
27 * - author_name: Themed author name field. 27 * - author_name: (optional) Themed author name field.
28 * - url: Direct URL of the current node. 28 * - url: Direct URL of the current node.
29 * - display_submitted: Whether submission information should be displayed. 29 * - display_submitted: Whether submission information should be displayed.
30 * - attributes: HTML attributes for the containing element. 30 * - attributes: HTML attributes for the containing element.
31 * The attributes.class element may contain one or more of the following 31 * The attributes.class element may contain one or more of the following
32 * classes: 32 * classes:
82 %} 82 %}
83 {{ attach_library('classy/node') }} 83 {{ attach_library('classy/node') }}
84 <article{{ attributes.addClass(classes) }}> 84 <article{{ attributes.addClass(classes) }}>
85 85
86 {{ title_prefix }} 86 {{ title_prefix }}
87 {% if not page %} 87 {% if label and not page %}
88 <h2{{ title_attributes }}> 88 <h2{{ title_attributes }}>
89 <a href="{{ url }}" rel="bookmark">{{ label }}</a> 89 <a href="{{ url }}" rel="bookmark">{{ label }}</a>
90 </h2> 90 </h2>
91 {% endif %} 91 {% endif %}
92 {{ title_suffix }} 92 {{ title_suffix }}