Forum

Thread tagged as: Question, Problem, Events

I need to automate/ rotate upcoming dates on a page.

I am new to this stuff. So sorry about this.

I need to automatically rotate holiday dates from a user created list when the date has expired.

https://praxis-petry.de/praxiszeiten-urlaubsplanung.php

It is in German, but when the date in the blue bar has expired the next date from the yellow list should automatically be displayed in the blue bar.

A step in the right direction would be helpful and I would be Thankful. Cheers Tony

Tony Melvin

Tony Melvin 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You want to sort your region by dates, and then filter by dates that are greater than today (so in the future).

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

Thanks Drew. I will talk a look at this and try to integrate it later.

Cheers Tony