Public Member Functions | |
layout () | |
Layout our PR2 page and buffer it in the SPage object's meta-slot buffer. | |
layoutBottomTags ($page, $ms, $layout) | |
Layout the BottomTags meta-slot. | |
layoutHead ($page, $ms, $dl) | |
Layout the Head meta-slot. | |
layoutStartBodyTags ($page, $ms, $layout) | |
Layout the StartBodyTags meta-slot. | |
layoutTopTags ($page, $ms, $layout) | |
Layout the TopTags meta-slot. | |
msBuild ($page, $ms, $layout) | |
Generate the output for a specified meta-slot. | |
msBuildDefault ($page, $ms, $layout) | |
Generate the output for one of the default meta-slots. |
Layout classes in PR2 are the classes that generate the actual output HTML. They do this by: (1) consulting the PR2's SPageTemplate object to see what meta-slots should be displayed and in what order (2) generating the HTML for each of these meta-slots based on the slots set in the SPage object (3) appending each of these completed meta-slots onto the SPage object.
This most basic layout class provides functions to build the HTML of meta-slots that should be common to most all site layouts.
This class can be extended to provide layouts that will work website-wide (i.e.,SShodorLayout) or a project-wide.
SLayout::layout | ( | ) |
Layout our PR2 page and buffer it in the SPage object's meta-slot buffer.
Layout all meta-slots requested by the PR2's page template; add the output to the SPage meta-slot buffer.
Ask the parent PR2 object for the active page layout. Get the meta-slots list requested by that pageLayout (using getMetaSlotsList()). For each of those meta-slots, generate the output (typically HTML) by calling msBuild(). This will switch on the name of the meta-slot to call layout functions in this class or subclasses. Output from the layout functions is appended onto the SPage object's meta-slot buffer.
SLayout::layoutBottomTags | ( | $ | page, | |
$ | ms, | |||
$ | layout | |||
) |
Layout the BottomTags meta-slot.
This slot contains the end of the table that contains the main content of the page, the closing body tag, and the analytics code (if the Omniture or Analytics slots are full)
SLayout::layoutHead | ( | $ | page, | |
$ | ms, | |||
$ | dl | |||
) |
Layout the Head meta-slot.
This slot contains the head section of an HTML document, with all head tags, etc.
$page | [SPage]: The SPage object | |
$ms | [string]: The name of the meta-slot to layout | |
$dl | [string]: The layout configuration for this meta-slot |
Reimplemented in SShodorLayout.
SLayout::layoutStartBodyTags | ( | $ | page, | |
$ | ms, | |||
$ | layout | |||
) |
Layout the StartBodyTags meta-slot.
This slot contains the opening body tag of the document, along with the start of the table containing the main content of the page.
SLayout::layoutTopTags | ( | $ | page, | |
$ | ms, | |||
$ | layout | |||
) |
SLayout::msBuild | ( | $ | page, | |
$ | ms, | |||
$ | layout | |||
) |
Generate the output for a specified meta-slot.
Generate the output for a specified meta-slot by calling the appropriate layout methods using the msBuildDefault() function. The parameters passed must specify:
You should override this function in your SLayout subclass and switch on the meta-slot name. Catch all calls for your custom meta-slots and call layout functions for them. When your function is out of cases, call this parent function for the defaults.
$page | [SPage]: The SPage object | |
$ms | [string]: The name of the meta-slot to layout | |
$layout | [string]: The layout configuration for this meta-slot |
Reimplemented in SShodorLayout.
SLayout::msBuildDefault | ( | $ | page, | |
$ | ms, | |||
$ | layout | |||
) |
Generate the output for one of the default meta-slots.
Generate the output for a specified default meta-slot by calling the appropriate layout method. The default meta-slots supported are: