Jump to content

Custom admin page list sort


Beetrootman
 Share

Recommended Posts

Hello,

I am working on a website for a theatre with a calendar of performances. I have a page (all events) which can have children (single event). The children have a repeater field called dates, where numerous dates and other information (number of seats etc) for that event can be set. One event may have three or four different dates.

In the admin page list, I want to sort the children of the events page by the date of the first repeater. Setting the children sort order on the template of the events page to the dates field does not work, probably because the repeater has more fields other than just the date.

Is there a hook I can use to sort the page list? Can I use ProcessPageList::execute? I would need to specifically target that one particular page and its children.

In the screenshots below you can see the page list I want to sort (under Spectacles), and the dates repeater for each of those events.

I hope my explanation is clear,
Thanks for any help.

Screenshot 2020-02-24 15.27.32.png

Screenshot 2020-02-24 15.28.26.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...