FIX: fix order of pages on homepage

This commit is contained in:
Michal Kváček
2016-09-26 16:54:27 +02:00
parent c096a30b81
commit 044eb7e532
4 changed files with 12 additions and 3 deletions
+9 -1
View File
@@ -58,7 +58,15 @@ abstract class OnePage implements TemplateHandler
$pages = $pages->where('status', Content::STATUS_PUBLIC);
}
self:: $homepagePages = $pages->get();
$homepagePages = $pages->get()
->getDictionary();
foreach ($pageIds as $pageId) {
if (!isset($homepagePages[$pageId]))
continue;
self::$homepagePages[] = $homepagePages[$pageId];
}
self::$homepagePagesInitialized = true;
}