This template has the base HTML 4 document structure for pages and it’s logically divided as header, content and footer areas. It provides plug points for pages to insert content dynamically.
Let’s review some of these:
- A few providers are used in this template. Providers are just view components that filter and prepare their subcomponents for rendering. This way a full page can be built by merging several small and focused components. The providers in this template render the navigational area at the top of the page.
- A second template is referenced as the page_template attribute of the Page which is used for rendering the “main content area” of the page.
This template renders HTML code specific to the object that is being viewed. It’s logically structured with two sidebars and a content area. This content area in turn is divided into main and additional areas.
This is roughly the HTML code rendered by this template:
<div class="sidebar refine">
<div class="sidebar related">
The two sidebars and the additional area are handled by providers. The main area is handled by the content_template attribute of the Page object and can be set either through ZCML:
<!-- from schooltool/course/browser/flourish.zcml -->
or in Python code:
from zope.browserpage.viewpagetemplatefile import ViewPageTemplateFile
content_template = ViewPageTemplateFile('templates/f_course_view.pt')
A Page subclass can override any of these templates, composing its own rendering logic.