I'm trying to list pages related to page I'm currently on. I'm doing this by selecting the category and excluding current page.
Code: Select all
if ($page->category()) {
$exclude = $page->title();
$categoryKey = $page->categoryKey();
$category = getCategory($categoryKey);
foreach ($category->pages() as $pageKey) {
$page = buildPage($pageKey);
if ( $page->title() == $exclude) {} else {