Filter for two months from now?
Hello!
I'm currently modifying someone else's site which uses your Low Events. Currently, there are three columns, displaying prev/current/next month events, using date="{prev_month}", {this_month} and {next_month}.
I was hoping there was a way to shift this to display the current month, next month, and two months from now. Haven't been able to find a solution so far.
Sorry if this has already been discussed!
Replies
Low 28 Oct 2013 17:54
Can you post the entire template here? You can use http://pastie.org for large chunks of code.
adam 28 Oct 2013 17:57
No problem, here you go: http://pastie.org/8437885
Low 28 Oct 2013 20:26
Instead of using an embed three times, you might be better off using three low_events:entries tags, and using custom date ranges. The Calendar tag you're using only does prev and next months.
If all else fails, you could also use PHP in your templates to calculate the custom date ranges.
I can take a closer look for you tomorrow, if you haven't figured it out by then.
adam 29 Oct 2013 15:00
Can't seem to get this figured out, hopefully you can help me find a solution? Thanks in advance.
Low 29 Oct 2013 16:11
Try this on for size: http://pastie.org/private/oueazk9glk7...
adam 31 Oct 2013 20:46
Thanks so much for the reply! Unfortunately, I'm having trouble implementing this. I don't know much about PHP.
Because I'm editing an existing .html page, I've added some code I found to allow PHP within it. The PHP itself seems to be working, but I'm not getting something right. Only the current month is showing up.
Would you have the time to guide me through this a bit more? I'm sorry, but I'm stuck.
Low 1 Nov 2013 09:06
Okay, I've taken your code example and changed it slightly to work with current month, +1 month and +2 months. I still recommend you get rid of the embeds, but that's just best practice, and your responsibility, really.
Here's the code: http://pastie.org/private/wsitlfos6t0...
It uses PHP on Input and some Preload Replace vars. Does that help?
adam 4 Nov 2013 16:29
Thank you very much! It worked perfectly. Any place I could send over some money for a beer or coffee? It's the least I could do for the help.
Low 4 Nov 2013 16:52
You're welcome! Donations are accepted here. :)