From 8f9c444b51c87dc6a5e1f137e3f375c29e0d6d34 Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Tue, 6 Mar 2018 15:32:11 -0500
Subject: [PATCH] ISTWCMS-2372: Adding stories block template

---
 .../paragraph--uw-para-stories-block.html.twig        | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 templates/paragraphs/paragraph--uw-para-stories-block.html.twig

diff --git a/templates/paragraphs/paragraph--uw-para-stories-block.html.twig b/templates/paragraphs/paragraph--uw-para-stories-block.html.twig
new file mode 100644
index 00000000..5a10c2ce
--- /dev/null
+++ b/templates/paragraphs/paragraph--uw-para-stories-block.html.twig
@@ -0,0 +1,11 @@
+{% set stories = [] %}
+{% for item in content.field_uw_story_items|field_value %}
+  {% set stories = stories|merge([{ title: item['#paragraph'].field_uw_story_title.value, content: item['#paragraph'].field_uw_story_content.value}]) %}
+{% endfor %}
+
+{% include "@organisms/single-page/stories-block/stories-block.twig" with {
+  "anchor_link": content.field_uw_anchor_link.0['#context'].value,
+  "display_title": content.field_uw_display_title.0['#markup'],
+  "title": content.field_uw_block_title.0['#context'].value,
+  "stories": stories
+}%}
-- 
GitLab