I have two modest questions. The main thing I would be thankful to be answered is: how do I have to handle with field definitions in the LISE filter template? I did not found similar topics via search.
Here is a longer description:
I have a "select date" field in my instance. Items are displayed like this in the frontend:
-----------------------------------------
12 August 2019 (=select date)
Title 1
-----------------------------------------
14 September 2019
Title 2
-----------------------------------------
12 October 2019
Title 3
-----------------------------------------
So the filter form for "date" displays correctly:
-------------------
Choose date
12 August 2019
14 September 2019
12 October 2019
--------------------
As I have a lot of dates per month I would like to collect them like this
--------------------
Choose date
--------------------
Current month
September 2019
October 2019
November 2019
Decembre 2019
January 2020
--------------------
For the current month I have tried a lot of things as:
Code: Select all
{foreach from=$fielddef->values item=value}
<option>
{if $smarty.now|date_format:"%B %Y" eq $fielddef.date.value|date_format:"%B %Y"}
Current month
{else}
...
{/if}
</option>
</foreach>
All has no effect.
The next thing is: I have no idea by now how to collect the following month/years. So I need a mathematical formal. I know this is more a problem of my intellect than a LISE or CMSMS thing.