The situation
I have a page collection with children of a lot of different (!) pages and they are sorted ascending by date: http://www.hsv-alzey.de/aktuell/spielplan
My code looks like this:
<?php $matches = $site->index()->filterBy('template', 'match')->filterBy('date', '>=',time()-24*60*60)->sortBy('date','asc'); ?>
My blueprint contains a date field and a time field:
fields:
date:
label: Datum
type: date
format: DD.MM.YYYY
width: 1/2
time:
label: Uhrzeit
type: time
interval: 5
width: 1/2
The problem
I would like to sort the matches by date and time!
##The workaround
If thereβs no better solution I will add a readonly timestamp
field to the blueprint, use panel hooks to save the calculated value and sort by this field β¦ but there must be an easier solution!?
Any ideas?
By the way, I found Sorting of the subpages by date **AND** time but unfortunately that doesnβt help me