From 3712f6eff5c33f5ed4b72cffa5252fb10c5747d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 18 Dec 2018 11:12:54 -0500 Subject: [PATCH] Add a teaser template for case studies --- .../layout/node--case-study--teaser.html.twig | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 agaric/templates/layout/node--case-study--teaser.html.twig diff --git a/agaric/templates/layout/node--case-study--teaser.html.twig b/agaric/templates/layout/node--case-study--teaser.html.twig new file mode 100644 index 0000000..40cfef7 --- /dev/null +++ b/agaric/templates/layout/node--case-study--teaser.html.twig @@ -0,0 +1,31 @@ +{# Somewhat ironically, we take away the ability for case studies to be + represented by their title paragraph. Because we *don't* use the title + paragraph for the main listings on the front page and the /work page (both of + which use the tile view mode, which uses only set regular fields), the use of + the title paragraph for search results (and anywhere else we use teasers) + would be a surprise— the summary field, while also not used on the listing + pages, is at least consistently used across multiple content types. + + See agaric/templates/layout/node--teaser.html.twig for variables. +#} + + + +
+ {{ content.field_image }} + {% if node.bundle == 'case_study' and content.field_subtitle is not empty %} + + {% endif %} +
+
+

{{ label }}

+
+ {{ content.field_summary }} +
+
+ +
+ +{{ content|without('field_body_paragraph', 'field_subtitle', 'field_image', 'field_summary', 'uid', 'created') }}