Sorry in advance if this is a dumbo question, but I'm having trouble seeing the style to follow in the following situation:

 - user calls a url, say /object/tuesday_message

 - if today's date is a tuesday, render 'tuesday.pt'

 - otherwise render 'no_message.pt'

both tuesday.pt and no_message.pt are proper templates which need to follow the site's main template, and have some logic in a view class.

Without views, I would make tuesday_message a python script, and return the required template directly with context.tuesday() or context.no_message().

But what's the best way to do this with a view: I don't want users to be able to access the templates directly, so I can't redirect between them, and the two templates are sufficiently different not to be combined together in an if-else type way.

TIA

pete

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to