From 83fafecb35d24a7c81d76b9424bf99381eef5a42 Mon Sep 17 00:00:00 2001 From: Vivien HAAG Date: Fri, 18 Nov 2016 16:24:10 +0100 Subject: [PATCH] Fix Page Collections problem with @page.modular --- system/src/Grav/Common/Page/Page.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index fbf3ebdc3..eb87a9707 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -507,7 +507,7 @@ public function summary($size = null) } $summary = Utils::truncateHTML($content, $size); - + return html_entity_decode($summary); } @@ -2411,7 +2411,10 @@ public function evaluate($value) switch ($parts[0]) { case 'modular': $results = new Collection(); - $results = $results->addPage($page)->Modular(); + foreach ($page->children() as $child) { + $results = $results->addPage($child); + } + $results->modular(); break; case 'page': case 'self':