We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ca2e32 commit a1bc39eCopy full SHA for a1bc39e
index.php
@@ -21,7 +21,10 @@
21
foreach(option('sylvainjule.bouncer.list') as $role => $options) {
22
if($currentRole == $role) {
23
$fieldname = $options['fieldname'];
24
- $pages = $currentUser->$fieldname()->toPages();
+ // can't use ->toPages() here because it won't include drafts
25
+ $pages = $currentUser->$fieldname()->yaml();
26
+ $pages = array_map(function($p) use($kirby) { return $kirby->page($p); }, $pages);
27
+ $pages = new Pages($pages);
28
$nav = array_key_exists('nav', $options) && $options['nav'] ? $options['nav'] : false;
29
30
if($pages->count()) {
0 commit comments