[Product-Developers] Conditioning an action on a view that may or may not be registered?

Sean Gillies sgillies at frii.com
Fri Jan 11 18:00:56 UTC 2008


I have a product that registers a @@foo view for objects that provide
IFoo. I'd like to use it for an object action and condition the action's
provision without using a tool in the older Plone style. What's the best
pattern? Condition on whether the object provides IFoo (I haven't seen
any examples of this)? Condition on whether one can traverse to the view
like

condition_expr="object/@@foo | nothing"

? That would render the view twice, so not very efficient.

Any recommendations?

Sean




More information about the Product-Developers mailing list