Public Member Functions | |
getAttributeForMetaSlot ($metaSlot, $attribute) | |
Get an attribute related to a meta-slot. | |
getDisplayForMetaSlot ($metaSlot) | |
Get the display for a meta-slot. | |
getIndexForMetaSlot ($metaSlot) | |
Get the index of the meta-slot (its order within the page, starting at 0). | |
getLayoutForMetaSlot ($metaSlot) | |
Get the layout style for a meta-slot. | |
getMetaSlotsList () | |
List all the names of meta-slots that will be displayed. | |
setAttributeForMetaSlot ($metaSlot, $attribute, $value) | |
Set an attribute related to a meta-slot. | |
setDisplayForMetaSlot ($metaSlot, $display) | |
Change the display of a meta-slot (turn display on or off). | |
setLayoutForMetaSlot ($metaSlot, $layout) | |
Change the layout of a meta-slot. | |
swapMetaSlotOrder ($ms1, $ms2) | |
Swap the order of two meta-slots in the page. |
Store, in order, the list of meta-slots that could potentially be rendered as part of our page. For each slot, keep track of whether or not the meta-slot should or should display on the page, and what layout style it should use. Since the meta-slots are stored in order, an instance of this class can re-order the meta-slots to make page content appear in a different order.
When you extend this class, you should use the following methods to override the defaults on how meta-slots display:
SPageTemplate::getAttributeForMetaSlot | ( | $ | metaSlot, | |
$ | attribute | |||
) |
Get an attribute related to a meta-slot.
$metaSlot | [string]: The name of the meta-slot | |
$attribute | [string]: The name of the attribute to set |
SPageTemplate::getDisplayForMetaSlot | ( | $ | metaSlot | ) |
Get the display for a meta-slot.
$metaSlot | [string]: The name of the meta-slot |
SPageTemplate::getIndexForMetaSlot | ( | $ | metaSlot | ) |
Get the index of the meta-slot (its order within the page, starting at 0).
$metaSlot | [string]: The name of the meta-slot |
SPageTemplate::getLayoutForMetaSlot | ( | $ | metaSlot | ) |
Get the layout style for a meta-slot.
$metaSlot | [string]: The name of the meta-slot |
SPageTemplate::getMetaSlotsList | ( | ) |
List all the names of meta-slots that will be displayed.
Return a list, in the correct order, of all the meta-slots that should be displayed.
If the 'showTopMetaSlots' and 'showBottomMetaSlots' options are turned on, merge the standard top and bottom meta-slots with the list of slots specified by the template. If not, do not include the standard top and bottom meta-slots as part of the returned list.
The standard top and bottom meta-slots, as well as the default main meta-slots, are defined in SPageTemplateConfig.
SPageTemplate::setAttributeForMetaSlot | ( | $ | metaSlot, | |
$ | attribute, | |||
$ | value | |||
) |
Set an attribute related to a meta-slot.
$metaSlot | [string]: The name of the meta-slot | |
$attribute | [string]: The name of the attribute to set | |
$value | [mixed]: The value for the attribute |
SPageTemplate::setDisplayForMetaSlot | ( | $ | metaSlot, | |
$ | display | |||
) |
Change the display of a meta-slot (turn display on or off).
The display determines whether or not a particular meta-slot will display in the output page.
$metaSlot | [string]: The name of the meta-slot | |
$display | [bool]: True if the meta-slot should display, false if not. |
SPageTemplate::setLayoutForMetaSlot | ( | $ | metaSlot, | |
$ | layout | |||
) |
Change the layout of a meta-slot.
The layout determines how a particular meta-slot will display when it renders. (Layout of a meta-slot controls things such as whether a sidebar appears on the right or left of a page.)
$metaSlot | [string]: The name of the meta-slot | |
$layout | [string]: The name of the layout style for the meta-slot |
SPageTemplate::swapMetaSlotOrder | ( | $ | ms1, | |
$ | ms2 | |||
) |
Swap the order of two meta-slots in the page.
Pass in the name of two meta-slots whose order of display on the page should be swapped.
$ms1 | [string]: The name of the first meta-slot | |
$ms2 | [string]: The name of the second meta-slot |