getPublishedDB(); $statics = $pages->getStaticDB(); $pagesKey = array_merge($published, $statics); foreach ($pagesKey as $pageKey) { try { $page = new Page($pageKey); if ($page->isParent()) { $lowerTitle = Text::lowercase($page->title()); if (Text::stringContains($lowerTitle, $query)) { $tmp[$page->title()] = $page->key(); } } } catch (Exception $e) { // continue } } exit (json_encode($tmp)); ?>