Hi Brian.

In case you're thinking about using the page_parts extension, I have a
simple example to show how that might work for you. Page_factory and
page_parts are two excellent extensions, by the way -- highly recommend
them. Page_parts comes with some built-in custom parts, in particular the
datetime part is very useful.

In my site, I use page_parts to define the startdate and enddate of events.
These are tabs that have a calendar date picker, really convenient when
adding a new event, less error prone than typing the date. The content of
the startdate and enddate parts can then be used anywhere in your site.
Let's say from some other page you wanted to list upcoming events. The code
would look something like this:

  <ul>
  <r:find url="/events">
     <r:children:each>
        <r:if_later part="startdate">
           <li><r:date for="startdate" format="%A, %B %d:" /> <r:title
/></li>
        </r:if_later>
     </r:children:each>
  </r:find>
  </ul>

This assumes your events are ordered by start date.

Hope this helps as a starting place for some ideas.
-- 
marshal

Reply via email to