- These instructions mainly are designed for Dexterity content type subsystem, but can be used with any content types by replacing the behavior check with a marker interface check
- You are developing a Plone add-on as a Python package (as oppose, to say, edit files directly through-the-web)
- Content type has a certain Dexterity behavior applied on it
- Different files are served for view (visitors) and edit modes (content editing interface)
Note: There is no easy way currently directly check whether a certain widget and widget mode is active on a particular view. Thus, we do some assumptions and checks manually if we are on “edit” view.
Then we create the special conditions using Grok views and Python code. This code would go to yourcompany/app/browser/views.py Python module:
Question: how much Grok is included with Plone 4.1: at least parts of its are, but would this example work with vanilla Plone 4.01 without including five.grok manually as a dependency?