tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/33-grouping-by-monthCascade CMS: Discussion 2018-10-18T20:36:16Ztag:help-archives.hannonhill.com,2010-02-09:Comment/76199472011-06-02T22:01:41Z2011-06-02T22:01:41ZGrouping by month<div><p>If the dates are supplied from either the Start Date Metadata
field or a Date/Date-Time chooser from a Data Definition, those
dates will be UNIX timestamps in your Page XML. Depending on how
you're already listing each one of those items, it might as simple
as adding another HTML element between each one when a particular
condition is hit (i.e. - the month changes).</p>
<p>While looping though each item, you'll want to store the
"previous node's Month" value and compare it to the "current node's
Month" value. If it changes, then output the Month in your
HTML.</p>
<p>If you're grabbing those dates through a Page Chooser, the dates
will already be formatted and you'll need to convert them in a
different way before you can test for a change in the Month value.
<a href=
"http://help.hannonhill.com/discussions/how-do-i/387-start-date-value-in-index-block-vs-data-definition-page-chooser">
See this thread</a> for formatting dates being included from a
Chooser.</p>
<p>This is a general explanation of how you'd go about doing it.
I'd be glad to help you work through code if you get stuck. You can
post any code back to this particular thread if needed.</p></div>Charlie Holdertag:help-archives.hannonhill.com,2010-02-09:Comment/76199472011-08-03T20:40:10Z2011-08-03T20:40:10ZGrouping by month<div><p>Where you able to get this going? If not, re-open the thread and
let me know how I can help.</p></div>Charlie Holdertag:help-archives.hannonhill.com,2010-02-09:Comment/76199472011-08-05T14:06:45Z2011-08-05T14:06:45ZGrouping by month<div><p>Yes. You're solution worked. Thanks!</p></div>espanae