Other Articles Anywhere questions

IF using a Custom Field of type Date to compare

Marc's Avatar Marc
Hi there!

The following code works perfectly (note: [date] is a Custom Field):
<div class="calendrier">
<p>{articles category="echos-saison-en-cours" ordering="date asc"}</p>
{if date="&gt;now()"}test{/if}<br />
<p><span class="uk-badge">[tags]</span> <span uk-icon="calendar"></span> [date format="l d F Y"] <span uk-icon="clock"></span> [heure]<br />[introtext]</p>
<hr />

Except the following which does not trigger (no matter if I type < or > in the editor, the output remains empty) :
{if date="&gt;now()"}test{/if}

Have I missed something ? (for the rest, ordering by that CF date or displaying that CF date works fine)

Actually, I had taken that example from

But I think that it should be something like
{if date&gt;"now()"}test{/if}
Peter van Westen's Avatar Peter van Westen ADMIN
The if tags are not the same as filters. So the syntax is different.

Yes, you should us:
{if date>"now()"}test{/if}
Please post a rating at the Joomla! Extensions Directory
Marc's Avatar Marc
Okidoki, txs. I had not thought that there was a difference between IF and FILTERS. Good to know.
I learn every day 😉
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription