Hello!
I try to find a way to limit the $page->hasPrevListed() only to pages that has a toggle field turned to true.
I can’t figure out where should I insert the term of ->toggle()->‘true’ because it is not related to the $page but more reasonably to the PrevListed.
I tried this, but it doesn’t filter the pages at all:
<?php $myFilterPages = page('home')->children()->template('project')->listed()->toggle('true');?>
<?php if ($page->hasPrevListed($myFilterPages)): ?>'
...
<?php endif; ?>
I hope I’m understood
Thanks in advance!