Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation to display a node. Chris@0: * Chris@0: * Available variables: Chris@0: * - node: The node entity with limited access to object properties and methods. Chris@0: * Only method names starting with "get", "has", or "is" and a few common Chris@0: * methods such as "id", "label", and "bundle" are available. For example: Chris@0: * - node.getCreatedTime() will return the node creation timestamp. Chris@0: * - node.hasField('field_example') returns TRUE if the node bundle includes Chris@0: * field_example. (This does not indicate the presence of a value in this Chris@0: * field.) Chris@0: * - node.isPublished() will return whether the node is published or not. Chris@0: * Calling other methods, such as node.delete(), will result in an exception. Chris@0: * See \Drupal\node\Entity\Node for a full list of public properties and Chris@0: * methods for the node object. Chris@18: * - label: (optional) The title of the node. Chris@0: * - content: All node items. Use {{ content }} to print them all, Chris@0: * or print a subset such as {{ content.field_example }}. Use Chris@0: * {{ content|without('field_example') }} to temporarily suppress the printing Chris@0: * of a given child element. Chris@0: * - author_picture: The node author user entity, rendered using the "compact" Chris@0: * view mode. Chris@0: * - metadata: Metadata for this node. Chris@18: * - date: (optional) Themed creation date field. Chris@18: * - author_name: (optional) Themed author name field. Chris@0: * - url: Direct URL of the current node. Chris@0: * - display_submitted: Whether submission information should be displayed. Chris@0: * - attributes: HTML attributes for the containing element. Chris@0: * The attributes.class element may contain one or more of the following Chris@0: * classes: Chris@0: * - node: The current template type (also known as a "theming hook"). Chris@0: * - node--type-[type]: The current node type. For example, if the node is an Chris@0: * "Article" it would result in "node--type-article". Note that the machine Chris@0: * name will often be in a short form of the human readable label. Chris@0: * - node--view-mode-[view_mode]: The View Mode of the node; for example, a Chris@0: * teaser would result in: "node--view-mode-teaser", and Chris@0: * full: "node--view-mode-full". Chris@0: * The following are controlled through the node publishing options. Chris@0: * - node--promoted: Appears on nodes promoted to the front page. Chris@0: * - node--sticky: Appears on nodes ordered above other non-sticky nodes in Chris@0: * teaser listings. Chris@0: * - node--unpublished: Appears on unpublished nodes visible only to site Chris@0: * admins. Chris@0: * - title_attributes: Same as attributes, except applied to the main title Chris@0: * tag that appears in the template. Chris@0: * - content_attributes: Same as attributes, except applied to the main Chris@0: * content tag that appears in the template. Chris@0: * - author_attributes: Same as attributes, except applied to the author of Chris@0: * the node tag that appears in the template. Chris@0: * - title_prefix: Additional output populated by modules, intended to be Chris@0: * displayed in front of the main title tag that appears in the template. Chris@0: * - title_suffix: Additional output populated by modules, intended to be Chris@0: * displayed after the main title tag that appears in the template. Chris@0: * - view_mode: View mode; for example, "teaser" or "full". Chris@0: * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'. Chris@0: * - page: Flag for the full page state. Will be true if view_mode is 'full'. Chris@0: * - readmore: Flag for more state. Will be true if the teaser content of the Chris@0: * node cannot hold the main body content. Chris@0: * - logged_in: Flag for authenticated user status. Will be true when the Chris@0: * current user is a logged-in member. Chris@0: * - is_admin: Flag for admin user status. Will be true when the current user Chris@0: * is an administrator. Chris@0: * Chris@0: * @see template_preprocess_node() Chris@0: * Chris@0: * @todo Remove the id attribute (or make it a class), because if that gets Chris@0: * rendered twice on a page this is invalid CSS for example: two lists Chris@0: * in different view modes. Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: Chris@0: Chris@0: {{ title_prefix }} Chris@18: {% if label and not page %} Chris@0: Chris@0: {{ label }} Chris@0: Chris@0: {% endif %} Chris@0: {{ title_suffix }} Chris@0: Chris@0: {% if display_submitted %} Chris@0:
Chris@0: {{ author_picture }} Chris@0: Chris@0: {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %} Chris@0: {{ metadata }} Chris@0: Chris@0:
Chris@0: {% endif %} Chris@0: Chris@0: Chris@0: {{ content }} Chris@0: Chris@0: Chris@0: