tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/3088-comparing-dates-to-showremove-announcement-on-webpagesCascade CMS: Discussion 2015-09-22T21:05:59Ztag:help-archives.hannonhill.com,2010-02-09:Comment/263324452013-04-10T17:19:24Z2013-04-10T17:19:24ZComparing dates to show/remove announcement on webpages<div><p>Hi,</p>
<p>Just to clarify, you already have the announcement
showing/hiding based on the end date within Cascade, but wish to
update the live website?</p>
<p>If so, this can be accomplished using a <a href=
"http://www.hannonhill.com/kb/Publish-Set/">Scheduled Publish
Set</a> that publishes the Page(s) containing the announcement at a
specific interval. Depending on the sensitivity of this
announcement, your interval could vary.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/263324452013-04-11T14:54:02Z2015-09-22T21:05:59ZComparing dates to show/remove announcement on webpages<div><p>I though I replied to this.</p>
<p>Yes, we do have hide/show option as of now. But sometimes people
forget to update this information so I am trying to make it
dynamic.<br>
Is there a way I can accomplish this without having to go for
scheduled publishing?</p>
<p>Thanks for your help.</p></div>ssargamtag:help-archives.hannonhill.com,2010-02-09:Comment/263324452013-04-11T15:27:54Z2013-04-11T15:27:54ZComparing dates to show/remove announcement on webpages<div><p>Hm, other than scheduled publishing, you could perhaps write a
Web Services script that runs on a schedule to maybe look at the
announcement's end date and if it has passed publish out the
corresponding Page(s). This would essentially be the same as using
a scheduled Publish Set; however.</p>
<p>Another option I have seen is to publish the announcement as an
XML file containing information about the announcement (including
the alert) and use scripting such as PHP to read the announcement
and check to see if a) the announcement XML file is blank, or b)
the announcement's end date is valid. If the end date is valid,
show the announcement; otherwise, empty the announcement file. When
a new announcement is published, the process will repeat. This
could also work using Web Services to read the announcement Asset;
however, reading a static file from the web server would be much
more efficient.</p>
<p>The downside here is that you will be relying on an included
script on each page, so if there's an error those pages may have
issues. The benefit is that you only need to publish a single
announcement instead of potentially multiple Pages.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/263324452013-04-19T20:35:39Z2013-04-19T20:35:39ZComparing dates to show/remove announcement on webpages<div><p>Hi,</p>
<p>Just wanted to follow up to see if you had a chance to view my
<a href=
"http://help.hannonhill.com/discussions/velocity-formats/3088-comparing-dates-to-showremove-announcement-on-webpages#comment_26350100">
recent comment</a>.</p>
<p>Please let us know if you have any questions.</p>
<p>Thanks.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/263324452013-04-22T13:13:43Z2015-09-22T21:05:59ZComparing dates to show/remove announcement on webpages<div><p>Hi Ryan;</p>
<p>For some reason my comments are not being published. I replied
to this earlier.</p>
<p>We did decide to go for schedule publishing finally and it's
working great.</p>
<p>Thanks again for your amazing ideas.</p>
<p>Have a wonderful day!</p></div>ssargamtag:help-archives.hannonhill.com,2010-02-09:Comment/263324452013-04-22T13:23:11Z2013-04-22T13:23:11ZComparing dates to show/remove announcement on webpages<div><p>Thank you for the follow up, glad to hear you were able to solve
things with scheduled publishing.</p>
<p>My apologies for the inconvenience, I am not sure why your
comments are not being posted.</p>
<p>Have a great day!</p></div>Ryan Griffith