comparison core/modules/node/templates/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:
73 */ 73 */
74 #} 74 #}
75 <article{{ attributes }}> 75 <article{{ attributes }}>
76 76
77 {{ title_prefix }} 77 {{ title_prefix }}
78 {% if not page %} 78 {% if label and not page %}
79 <h2{{ title_attributes }}> 79 <h2{{ title_attributes }}>
80 <a href="{{ url }}" rel="bookmark">{{ label }}</a> 80 <a href="{{ url }}" rel="bookmark">{{ label }}</a>
81 </h2> 81 </h2>
82 {% endif %} 82 {% endif %}
83 {{ title_suffix }} 83 {{ title_suffix }}