API16:JHtmlList/positions
From Joomla! Documentation
Description
Select list of positions - generally used for location of images
<! removed transcluded page call, red link never existed >
Syntax
static positions($name, $active=null, $javascript=null, $none=1, $center=1, $left=1, $right=1, $id=false)
| Parameter Name | Default Value | Description |
|---|---|---|
| $name | ||
| $active | null | |
| $javascript | null | |
| $none | 1 | |
| $center | 1 | |
| $left | 1 | |
| $right | 1 | |
| $id | false |
Defined in
libraries/joomla/html/html/list.php
Importing
jimport( 'joomla.html.html.list' );
Source Body
public static function positions(
$name,
$active = null,
$javascript = null,
$none = 1,
$center = 1,
$left = 1,
$right = 1,
$id = false
)
{
$pos = array();
if ($none) {
$pos[''] = JText::_('JNone');
}
if ($center) {
$pos['center'] = JText::_('Center');
}
if ($left) {
$pos['left'] = JText::_('Left');
}
if ($right) {
$pos['right'] = JText::_('Right');
}
$positions = JHtml::_(
'select.genericlist',
$pos,
$name,
array(
'id' => $id,
'list.attr' => 'class="inputbox" size="1"'. $javascript,
'list.select' => $active,
'option.key' => null,
)
);
return $positions;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples