Rendering a Pageset
Rendering a Pageset
Rendering of a page set is done with a simple hierarchical set of templates, which can be
found in the /layout-manager/lib/render directory. Rendering consists of the following
steps:
- include the render pageset template, which gets an array of render data for the
given pageset and then
- includes the render page template, which gets an array of render data for the current
page within the pageset and then
- includes the page template for the given page, which sets the proper CSS for (say)
a thin column on the left and a thick column on the right, and generates the proper HTML for
the number of columns on the page, and then
- includes the render element template for each element on the page, which gets an
array of render data for the given element. The includelet referenced by the element
is included, while the theme assigned to the element is declared as the master template.
If the includelet is declared to be .LRN-compatible, parameters are passed in an
array named "cf", otherwise parameters are set directly in the scope of the includelet.
You can safely treat this process as a "black box" when writing an includelet, as
will be obvious when you study some examples.