FIX: fix paginated results in root pages in content editor
This commit is contained in:
@@ -46,7 +46,7 @@ class Content extends Repository implements IContent
|
||||
public function all()
|
||||
{
|
||||
return $this->getPageQuery()
|
||||
->get();
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ class Content extends Repository implements IContent
|
||||
$page->status = IContent::STATUS_DRAFT;
|
||||
$page->moduleSettings = [];
|
||||
} else {
|
||||
$page = $this->model->findOrFail($id);
|
||||
$page = $this->model->findOrFail($id);
|
||||
}
|
||||
|
||||
return $page;
|
||||
@@ -76,9 +76,8 @@ class Content extends Repository implements IContent
|
||||
public function getHomepage()
|
||||
{
|
||||
return $this->getPageQuery()
|
||||
->where('isHomepage', 1)
|
||||
->first();
|
||||
|
||||
->where('isHomepage', 1)
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,8 +90,8 @@ class Content extends Repository implements IContent
|
||||
public function getByURL($url)
|
||||
{
|
||||
return $this->getPageQuery()
|
||||
->where('url', $url)
|
||||
->first();
|
||||
->where('url', $url)
|
||||
->first();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,8 +125,6 @@ class Content extends Repository implements IContent
|
||||
$query = $query->whereIn('contents.status', $statuses);
|
||||
}
|
||||
|
||||
$pages = $query->paginate(setting('paginatedResults', 20));
|
||||
|
||||
return $pages;
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
@@ -107,7 +107,8 @@ class Menu implements WidgetRenderer
|
||||
$content = App::make(ContentContract::class);
|
||||
|
||||
// get list of all pages
|
||||
$pages = $content->getOverview();
|
||||
$pages = $content->getOverview()
|
||||
->get();
|
||||
|
||||
// make object from JSON
|
||||
if (!isset($widget->settings->links)) {
|
||||
|
||||
Reference in New Issue
Block a user