clicktonext / support

Report a issues or ask a question for Click to Next's products (theme/plugin).
MIT License
1 stars 0 forks source link

Mimar theme natural sorting #2

Open jklue opened 2 years ago

jklue commented 2 years ago

On a Posts template page, the subpages block Sort field has "Sort" as an option but doesn't allow me to re-order the posts manually. These are naturally sorted by date.

afbora commented 2 years ago

@lukehatfield We apologize for the delay. We can reproduce the issue. But this seems unlikely to be resolved. Because it is not possible for Kirby to dynamically pull the sort of the pages from a setting in a block. Do you have an solution?

jklue commented 2 years ago

Thanks @afbora, I added an elseif starting on line 29 to the sort field check so we could skip the ->sort() on line 48. Then I added a check for null at the end to skip sorting. Don't know why it didn't work, but this seems to work better.

Screen Shot 2022-09-09 at 11 07 16 AM

Screen Shot 2022-09-09 at 11 10 24 AM