rasteiner/k3-pagesdisplay-section

Can pagesdisplay be called in templates ?

plagasul opened this issue · 1 comments

Is pagesdisplay supposed to be callable in templates in the regular manner, say:

for ($page->pagesdisplayfieldinstance()->toPages() as $p) ...

Thanks

Hello! No, pagesdisplay is a section and doesn't store any info in the page. Its only purpose is to display a set of pages in the panel.

If you want to have the same collection of pages in the template and as display in the panel, you could use something like a collection, a page model function or a page method, and then call that in both the template as well as the panel blueprint