Search

I need to display a series of calendar events by season. I have been using $this-year in my cal. event DS filter, but I forgot about winter (or should I say summer?) spanning this year and next year. The problem is that if it is December, I need to also get next year's Jan-Feb. If it is Jan-Feb, i need to also get last year's December (the events are not to be removed after they happen until the next season).

Any ideas?

Sounds like you need some custom page params representing seasons. It could potentially be done with a simple Extension. Install cookie monster, and you will be adding a delegate for manipulating the page parameters. If you then used that delegate to add something like this-summer = '2008-12-01 to 2009-02-28' into the page params, you could use it in your DS.

http://pastie.org/205153

Create a folder /extensions/seasons/ and put the code from the link into a file called extension.driver.php. You will probably want to tweak those date ranges to make them dynamic, but it's a start.

I haven't tested it at all, so let me know if that helps.

Thanks Alistair, I'll give it a shot

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