
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.
Definition at line 24 of file SLayout.php5.
| 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.
Definition at line 45 of file SLayout.php5.
References msBuild().
| 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)
| $page | [SPage]: The SPage object | |
| $ms | [string]: The name of the meta-slot to layout | |
| $layout | [string]: The layout configuration for this meta-slot |
Definition at line 343 of file SLayout.php5.
Referenced by msBuildDefault().
| 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.
Definition at line 132 of file SLayout.php5.
References SPath::getRelPath().
Referenced by msBuildDefault().
| 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.
| $page | [SPage]: The SPage object | |
| $ms | [string]: The name of the meta-slot to layout | |
| $layout | [string]: The layout configuration for this meta-slot |
Definition at line 318 of file SLayout.php5.
Referenced by msBuildDefault().
| SLayout::layoutTopTags | ( | $ | page, | |
| $ | ms, | |||
| $ | layout | |||
| ) |
Layout the TopTags meta-slot.
This slot contains the HTML doctype, the opening HTML tag, and the PR2 version comment
| $page | [SPage]: The SPage object | |
| $ms | [string]: The name of the meta-slot to layout | |
| $layout | [string]: The layout configuration for this meta-slot |
Definition at line 298 of file SLayout.php5.
References SConfig::getDefault().
Referenced by msBuildDefault().
| 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.
Definition at line 84 of file SLayout.php5.
References msBuildDefault().
Referenced by layout().
| 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:
| $page | [SPage]: The SPage object | |
| $ms | [string]: The name of the meta-slot to layout | |
| $layout | [string]: The layout configuration for this meta-slot |
Definition at line 102 of file SLayout.php5.
References layoutBottomTags(), layoutHead(), layoutStartBodyTags(), and layoutTopTags().
Referenced by msBuild().
1.5.6