Forum

Thread tagged as: Question

Fixture List to show next game

Hi

I am currently trying to set up a fixture list for a sports club. I want to use events for social and other events within the club rather than fixtures. So I am using perch content custom template I have created. I would like to display the next upcoming fixture on the homepage with a complete list of fixtures on another page. Is it possible with perch content custom to do this?

Thanks

Neil

Neil Irwin

Neil Irwin 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Sure. If the date field on your fixtures has the id date then it would be something like:

perch_content_custom('Fixtures', [
    'sort' => 'date', 
    'sort-order' => 'ASC',
    'count' => 1,
    'filter' => 'date',
    'match' => 'gte',
    'value' => date('Y-m-d H:i:00'),
]);

Great thanks