Content plugin Upcoming & Past Date filter

sunnyjey

Active Member
I am trying to display the List of upcoming and another List of Past Events using content plugin.

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]>=now mytable___date[condition]=>}

The above content syntax correctly display all future Events.

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]<=now mytable___date[condition]=>}

But this doesn't work for Past events.

What is correct PHP operator to filter Date for Past, as '<=' AND '<' are not working ? Is there any alternate way to display Past events ?
 
I don't know if this example is still valid, but if it is it says
{fabrik view=list id=1 fab_events___start_date[value]=x fab_events___start_date[condition]=>}
which is not like the code in your example.

Following this thread it should be something like
mytable___date[value]=2019-08-20 mytable___date[condition]=<

Are you sure "now" is doing?
Use fabrikdebug to see which query is generated.
 
Are you sure "now" is doing?
Use fabrikdebug to see which query is generated.

Not sure, as fabrikdebug shows WHERE 2=-2 in query generated. Tried all other options, but no use.

Can you suggest any alternative way to display ONLY past records. The filter in content plugin should be like:

WHERE 'date_time' IS LESS THAN 'current time'
 
Yes. I tried all options for hours but no use.

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]<now mytable___date[condition]=>}

Code:
{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]<now}

Code:
$currentTime = new JDate('now');

{fabrik view=list listid=X  showfilters=0 hide-add=1 layout=bootstrap mytable___joined_raw[value][]=" .$JoinedID . " mytable___date[value][]=" .$currentTime . "}
 
Not sure what you are doing at all: at least the code you are showing is nor php nor HTML...
Where are you using this?

Did you try with hardcoded values (id, date...) for testing?
 
I've tested: content plugin
{fabrik view=list id=17 termin_reservation___id[value]=101 termin_reservation___id[condition]=> termin_reservation___von[value]=2018-01-01 termin_reservation___von[condition]=<}

is working fine on my site (on save < and > are converted to &lt; etc. but this is still working)
Fabrik debug is showing
...WHERE ( `termin_reservation`.`id` > 101 AND `termin_reservation`.`von` < '2018-01-01' )

Are you running a recent GitHub version?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top