Time-sensitive or expiring content


#1

Hi. I’m new to Radiant (and Ruby, RoR) but eager to use Radiant for a
website I maintain. The site has an Events page where upcoming events,
workshops, etc. are listed. The Home page of the site displays a
summary of the events; a list of links to the events with their start
dates. Nothing fancy. Look at http://octopusgardenyoga.com if you’re
interested. It’s maintained manually by editing the events.html and
index.html files whenever events are added and as they expire.

I was hoping to find a way to automate the updating of the events and
the summary list and Sean C.’ weblog on time-sensitive content
(http://radiantcms.org/blog/2006/11/24/how-to-write-time-sensitive-or-expiring-content/)
looked like it would do the job. So after much stumbling around, I
finally managed to get his tags working as extensions on my
development system (Ubuntu Linux with radiant-0.6.0rc1.gem installed).
In my Radiant-mental version, each event is a child page of /events/
and they are displayed with:

<r:children:each>

This works as expected with expired content not displaying. However,
I’ve not been able to get it to work for the summary list on the home
page:

Upcoming Events

    <== this makes no difference
  • :
  • <== "start" has start date content

Everything shows up whether it’s expired or not. If anyone has any
ideas for making the summary list work, I would very much appreciate
hearing from you.

BTW, I’ve read most of the discussion on page ordering, and while I
don’t pretend to understand the implementation issues, I think this
would be a very useful feature to have. It seems to me that two
additional page attributes, “display_on” and “remove_after” (or
something to that effect), might do the trick for both page ordering
and time-sensitive content. For example, <r:children:each
by=“display_on”> would provide page ordering and something like
<r:if_date matches"regexpr"> would hide expired content. Just a
thought.

Thanks in advance.