Search
Other Articles Anywhere questions
Forum

Filter all articles on a given date (any year)

David Clements's Avatar David Clements
Hi,
Just started using Articles Anywhere v11.1.3pro on Joomla 4.0.5. I love the flexibility and have managed to do almost everything I needed to. But I'm trying to display all articles in a category that were created on this day in any year i.e. 14/12 and am getting in a muddle over the syntax. I read something about this, somewhere in the documentation, before I installed the extension but - inevitably - can't find the reference now!
Thanks for your help,
G
Peter van Westen's Avatar Peter van Westen ADMIN
I haven't tested this, but you can try something like:
{articles category="..."}{if date(created, "d-m") = "14-12"}
...
{/if}{/articles}
Please post a rating at the Joomla! Extensions Directory
David Clements's Avatar David Clements
Thanks, Peter, for a quick response.

I had been trying variations on that theme, including your suggestion, but have not had any success. The date format characters work for outputs but I can't get them to work in a filter.

I wanted to develop my original question - selecting articles on a given date of the year - to select all articles on today's date of any year:

{articles category="..."}{if date(created, "d-m") = date(today, "d-m")}

but this too fails.

I have implemented a workaround by using the article title to match the date - at least for one year! But a more permanent solution such as {articles title=date(today, "j F")"} also fails.

David
Peter van Westen's Avatar Peter van Westen ADMIN
date(today, "d-m")
title=date(today, "j F")"
Both of those are not using the correct syntax.
Make sure you use the quotes in the right places.
See: docs3.regularlabs.com/articlesanywhere/p...alues-relative-dates
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription