2

Thanks for this @mmc501 I have adapted the code to work the wonderful sprig plugin. {% set time = time ?? "now" %} <div class="grid text-center"> <div class="col"> <button sprig s-vars="time: '{{time|date_modify('-1 month')|date()}}'">Prev</button> </div> <div class=...


2

Date fields in Craft are returned as DateTime objects, so you need to convert these to a string to be able to compare them. The best way of doing this is to use the yyyy-mm-dd format as this makes it is easy to compare dates. So your comparison would become: {% if (entry.dateUpdated|date('Y-m-d')) >= (entry.postDate|date('Y-m-d')) %} Updated on {{...


1

You're not checking against a valid field there - try using entry.postDate instead of entry.post


1

Figured it out, needed to format the postDate object accordingly: {% set products = products | supersort('rsortAs', '{ postDate | date("U") }') %}


Only top voted, non community-wiki answers of a minimum length are eligible