Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation for comments. Chris@0: * Chris@0: * Available variables: Chris@0: * - author: Comment author. Can be a link or plain text. Chris@0: * - content: The content-related items for the comment display. Use Chris@0: * {{ content }} to print them all, or print a subset such as Chris@0: * {{ content.field_example }}. Use the following code to temporarily suppress Chris@0: * the printing of a given child element: Chris@0: * @code Chris@0: * {{ content|without('field_example') }} Chris@0: * @endcode Chris@0: * - created: Formatted date and time for when the comment was created. Chris@18: * Preprocess functions can reformat it by calling DateFormatter::format() Chris@18: * with the desired parameters on the 'comment.created' variable. Chris@0: * - changed: Formatted date and time for when the comment was last changed. Chris@18: * Preprocess functions can reformat it by calling DateFormatter::format() Chris@18: * with the desired parameters on the 'comment.changed' variable. Chris@0: * - permalink: Comment permalink. Chris@0: * - submitted: Submission information created from author and created Chris@0: * during template_preprocess_comment(). Chris@0: * - user_picture: The comment author's profile picture. Chris@0: * - status: Comment status. Possible values are: Chris@0: * unpublished, published, or preview. Chris@0: * - title: Comment title, linked to the comment. Chris@0: * - attributes: HTML attributes for the containing element. Chris@0: * The attributes.class may contain one or more of the following classes: Chris@0: * - comment: The current template type; for instance, 'theming hook'. Chris@0: * - by-anonymous: Comment by an unregistered user. Chris@0: * - by-{entity-type}-author: Comment by the author of the parent entity, Chris@0: * eg. by-node-author. Chris@0: * - preview: When previewing a new or edited comment. Chris@0: * The following applies only to viewers who are registered users: Chris@0: * - unpublished: An unpublished comment visible only to administrators. 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: * - content_attributes: List of classes for the styling of the comment content. Chris@0: * - title_attributes: Same as attributes, except applied to the main title Chris@0: * tag that appears in the template. Chris@0: * - threaded: A flag indicating whether the comments are threaded or not. Chris@0: * Chris@0: * These variables are provided to give context about the parent comment (if Chris@0: * any): Chris@17: * - parent_comment: Full parent comment entity (if any). Chris@0: * - parent_author: Equivalent to author for the parent comment. Chris@0: * - parent_created: Equivalent to created for the parent comment. Chris@0: * - parent_changed: Equivalent to changed for the parent comment. Chris@0: * - parent_title: Equivalent to title for the parent comment. Chris@0: * - parent_permalink: Equivalent to permalink for the parent comment. Chris@0: * - parent: A text string of parent comment submission information created from Chris@0: * 'parent_author' and 'parent_created' during template_preprocess_comment(). Chris@0: * This information is presented to help screen readers follow lengthy Chris@0: * discussion threads. You can hide this from sighted users using the class Chris@0: * visually-hidden. Chris@0: * Chris@0: * These two variables are provided for context: Chris@0: * - comment: Full comment object. Chris@0: * - entity: Entity the comments are attached to. Chris@0: * Chris@0: * @see template_preprocess_comment() Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: Chris@0: Chris@0: {# Chris@0: Hide the "new" indicator by default, let a piece of JavaScript ask the Chris@0: server which comments are new for the user. Rendering the final "new" Chris@0: indicator here would break the render cache. Chris@0: #} Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: {% if title %} Chris@0: {{ title_prefix }} Chris@0: {{ title }} Chris@0: {{ title_suffix }} Chris@0: {% endif %} Chris@0: {{ content }} Chris@0: Chris@0: