Skip to content

Commit

Permalink
Adding a check to remove not localized pages from showing up in the f…
Browse files Browse the repository at this point in the history
…ilter
  • Loading branch information
Eworm committed Nov 3, 2019
1 parent 3ed31bd commit 133d6fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions BigKahuna/BigKahunaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,17 @@ private function getItems($request, $locale)
$return_entries = [];
foreach ($entries as $entry) {
$id = $entry->id();
if ($entry->contentType() == 'page') {
$title = $entry->in($locale)->get('title');
if ($entry->contentType() == 'page' && $title != null) {
$return_entries[] = [
'id' => $id,
'title' => $entry->in($locale)->get('title'),
'title' => $title,
'type' => 'Pages',
];
} elseif ($entry->contentType() == 'entry') {
$return_entries[] = [
'id' => $id,
'title' => $entry->in($locale)->get('title'),
'title' => $title,
'type' => ucwords(str_replace('-', ' ', $entry->collectionName()))
];
} elseif ($entry->contentType() == 'term') {
Expand Down

0 comments on commit 133d6fa

Please sign in to comment.