Page 1 of 1

Simple GCB Scheduling Plugin? [solved]

Posted: Wed Jan 23, 2013 3:48 pm
by Jonny
Occasionally I need to add temporary content alerting visitors to something that will cease to be relevant on a certain date. For this I create a Global Content Block and manually add and remove it from the relevant page.

Is there an easy way to schedule a GCB to be removed on a given day e.g. not displayed beyond a certain unix time? A plugin with parameters for the GCB and unix time of start and end times maybe?

Re: Simple GCB Scheduling Plugin?

Posted: Wed Jan 23, 2013 3:51 pm
by calguy1000
something like this should work:

Code: Select all

{if $smarty.now < strtotime('February 1, 2013')}
DISPLAY SOME CONTENT
{/if}

Re: Simple GCB Scheduling Plugin?

Posted: Wed Jan 23, 2013 4:50 pm
by Jonny
That's certainly simple and effective! Thanks very much.