position( $name, $style='', $preHtml='', $postHtml='', $attribs=array() )

Creates an array that defines a module position. This function does not actually render a module position. It creates the following array:

$position = array();
$position['name'] = $name;
$position['style'] = $style;
$position['preHtml'] = $preHtml;
$position['postHtml'] = $postHtml;
$position['attribs'] = $attribs;
  • string $name: The name of the module position.
  • string $style: (Optional) The name of the module chrome style to be used to render modules in the position.
  • string $preHtml: (Optional) A string that gets added to the markup before the position is loaded. This can be any HTML string. This string only renders if the position has modules.
  • string $postHtml: (Optional) A string that gets added to the markup after the position is loaded. This can be any HTML string. This string only renders if the position has modules.
  • array $attribs: (Optional) An array of attributes to be passed to each module in the position.

The array created with this function is used in an array of position arrays to be passed into the positions() function.

Last modified on Monday, 12 April 2010 10:36

Add comment