Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
show only readable pages - fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
rasteiner authored Mar 7, 2021
1 parent 262a256 commit 1228414
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/PagesDisplaySection.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
$pages = $q->result();

if(is_a($pages, 'Kirby\\Cms\\Pages')) {
// show only readable
$pages = $pages->filterBy("isReadable", true);

// sort
if ($this->sortBy) {
$pages = $pages->sortBy(...Str::split($this->sortBy, ' '));
Expand Down

0 comments on commit 1228414

Please sign in to comment.