Skip to content

Commit

Permalink
fix: index subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
64knl committed Apr 18, 2024
1 parent 3f376ab commit 2b1a6a7
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Services/Indexer/IndexBuilderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,20 @@ private function indexChildPages($parentId)
continue;
}

$menu = Menu::whereId($page->id)->firstOrFail();

if (! isset($page->template->properties->searchable) || $page->template->properties->searchable == 0) {
$this->writeDebug(" skipping, template not searchable\n");

continue;
}
if (isset($page->properties->excludeFromSearch) && $page->properties->excludeFromSearch == true) {
} elseif (isset($page->properties->excludeFromSearch) && $page->properties->excludeFromSearch == true) {
$this->writeDebug(" skipping, page not searchable\n");

continue;
}

$menu = Menu::whereId($page->id)->firstOrFail();
} else {

foreach ($this->locales as $lang) {
$this->updatePage($menu, $lang);
foreach ($this->locales as $lang) {
$this->updatePage($menu, $lang);
}
}

// index subitems for page
foreach ($this->locales as $lang) {
$this->updateSubPages($menu, $lang);
Expand Down

0 comments on commit 2b1a6a7

Please sign in to comment.