.. or you can setup event subscriber in your configure.zcml something like this:
<subscriber
for="your.package.interfaces.IYourContentType
Products.CMFCore.interfaces.IActionSucceededEvent"
handler=".handlers.yourTransitionHandler"
/>
and then in the "handlers.py" module handle the layout setting:
def yourTransitionHandler(self, event):
""" """
if event.action == 'publish':
event.object.setLayout('publish_view')
elif:
event.object.setLayout('other_view')
Lukas
On Apr 27, 2010, at 8:35 PM, Laurence Rowe wrote:
>
> Alternatively you could use a normal script / view as the default layout and
> do something like:
>
> review_state = context.portal_workflow.getInfoFor(context, 'review_state')
> return context.traverse(review_state)
>
> This assumes you have registered a view for each possible review_state.
> --
> View this message in context:
> http://plone.293351.n2.nabble.com/Set-a-default-view-based-on-workflow-review-state-tp4937905p4970147.html
> Sent from the Product Developers mailing list archive at Nabble.com.
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/product-developers
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers