Last active
December 17, 2015 17:39
-
-
Save jenlampton/5647420 to your computer and use it in GitHub Desktop.
New node template (and variables) for Twig in D8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article id="node-{{ nid }}" class="clearfix {{ attributes.class }}"{{ attributes }}> | |
{{ title.prefix }} | |
{% if not page %} | |
<h2{{ title.attributes }}><a href="{{ url }}" rel="bookmark">{{ title.label }}</a></h2> | |
{% endif %} | |
{{ title.suffix }} | |
{% if display_submitted %} | |
<footer> | |
{{ author }} | |
<p class="submitted"> | |
{% trans %} | |
Submitted by {{ author.name }} on {{ published_date|format_date('medium') }} | |
{% endtrans %} | |
</p> | |
</footer> | |
{% endif %} | |
<div{{ content.attributes }}> | |
{# We hide the comments and links now so that we can render them later. #} | |
{{ content.field_x }} | |
{{ content.inner }} | |
</div> | |
{{ links }} | |
{{ comments }} | |
</article> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment