Hi there,
my current project contains a blueprint which has sub pages of different types. All these pages are in the same sub directory. For one page type sorting shall be done by a date field, the other one shall be sorted by other criterias of the given sub page.
My idea was to use a custom method of the given sub page models to realize the sorting (c.f. https://getkirby.com/docs/panel/blueprints/subpages-settings#numbering-of-subpages). During the first tests I realized that in the panel pages are not instantiated with their correct types. Hence, the custom page method for sorting is not available.
Would the intended sorting work for the site/frontend? Are there any other suggestion how to fulfill my requirements?
Ok so by different types, I’m assuming that the different subpages use different templates? You can filter and sort quite easily on the front end by template. You can also do this in the blueprint to sort the pages in the panel, by template.
Have you tried to create a page model instead of a custom page method? I’m not quite sure if page models are respected in the Panel, but might be worth a try.
I would like to define a custom page method for sorting subpages that sort on multiple fields and display this multiple fields in the left panel section. Say I have and ID-field with the value “2018030” and the title-field “MyProject-3”. Then I would like have to sorted the subpages in the left panel displayed in the following order:
…
“2017050 MyProjekt from the past”
“2018030 MyProject-3”
…
I would appreciate any (starting) hint how to define such a custom page method for sort and display. Many thanks in advance and with best regards,