Search

Under the data source editor in s2 rev5 under filter results... i'm trying to filter entries by Date with xxxx-{$this-month}-{$this-day}. i'm trying to do this day in history... to pull all the entries with the month and day but i want the year to be a wildcard.

is there anyway i can achieve this?

NOTE: the "xxxx" is there for a place holder.

I'm trying to show only the articles for this-month and this-day. I don't want the year to be filtered out. In other words, I'm trying to achieve a functionality that would be on today's date in history.

Per thewolf...

If you want the years from 1991 to say 2030, you would enter this (to filter out your datasource)...

1991-{$this-month}-{$this-day}, 1992-{$this-month}-{$this-day}, 1993-{$this-month}-{$this-day}, 1994-{$this-month}-{$this-day}, 1995-{$this-month}-{$this-day}, 1996-{$this-month}-{$this-day}, 1997-{$this-month}-{$this-day}, 1998-{$this-month}-{$this-day}, 1999-{$this-month}-{$this-day}, 2000-{$this-month}-{$this-day}, 2001-{$this-month}-{$this-day}, 2002-{$this-month}-{$this-day}, 2003-{$this-month}-{$this-day}, 2004-{$this-month}-{$this-day}, 2005-{$this-month}-{$this-day}, 2006-{$this-month}-{$this-day}, 2007-{$this-month}-{$this-day}, 2008-{$this-month}-{$this-day}, 2009-{$this-month}-{$this-day}, 2010-{$this-month}-{$this-day}, 2011-{$this-month}-{$this-day}, 2012-{$this-month}-{$this-day}, 2013-{$this-month}-{$this-day}, 2014-{$this-month}-{$this-day}, 2015-{$this-month}-{$this-day}, 2016-{$this-month}-{$this-day}, 2017-{$this-month}-{$this-day}, 2018-{$this-month}-{$this-day}, 2019-{$this-month}-{$this-day}, 2020-{$this-month}-{$this-day}, 2021-{$this-month}-{$this-day}, 2022-{$this-month}-{$this-day}, 2023-{$this-month}-{$this-day}, 2024-{$this-month}-{$this-day}, 2025-{$this-month}-{$this-day}, 2026-{$this-month}-{$this-day}, 2027-{$this-month}-{$this-day}, 2028-{$this-month}-{$this-day}, 2029-{$this-month}-{$this-day}, 2030-{$this-month}-{$this-day}

This worked. THANKS WOLF!

Also, if anyone knows another way to make the year dynamic that would be helpful.

You could try something like this:

regexp:^(1|2)[0-9][0-9][0-9]-{$this-month}-{$this-day}

That will match all years from 1000 to 2999, which may not be ideal. You could tweak the regex a little though.

In order to get this working you will need to patch /lib/toolkit/fields/field.data.php using the latest code from the git repository which you can get here. There was a bug which prevented the regexp filters being identified properly.

If you need more info on the regexp stuff, have a look at this thread

Alistair -

That worked! Thanks for your help!

BZ

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details