Chapter 11. Standalone Views and Forms
In the previous chapter, we learned how to create content types with custom views. When rendering a view, the current content item was accessed through the context
variable. Because of the way that the views were registered, they could make the assumption that their context provided a particular interface, through which it could be inspected or modified.
Not all pages in an application will be tied to a specific content type, however in this chapter, we will learn about:
- Templates and forms more generally
- Creating views that are not registered for a particular type of context, but are available either everywhere or on the portal root
- Handling form submissions in views that submit to themselves
- Auto-generating forms using the
z3c.form
library - Writing viewlets
- Creating a control panel form
- Using the global helper functions Plone makes available to all views
Pages without a specific context
As it happens, there is no such thing as a truly context-less...