rasteiner / k3-pagesdisplay-section

K3 plugin: display any page list in a section. Any parent, many parents, filtered, don't care.
Other
45 stars 8 forks source link

Can pagesdisplay be called in templates ? #12

Closed plagasul closed 2 years ago

plagasul commented 2 years ago

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

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

Thanks

rasteiner commented 2 years ago

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