Difference between revisions of "JHtmlList/positions"
From Joomla! Documentation
< API16:JHtmlList
(New page: ===Description===
Select list of positions - generally used for location of images
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JHtmlList/positio...) |
m (preparing for archive only) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
Select list of positions - generally used for location of images | Select list of positions - generally used for location of images | ||
− | |||
− | |||
− | |||
− | + | ||
+ | <! removed transcluded page call, red link never existed > | ||
===Syntax=== | ===Syntax=== | ||
Line 98: | Line 96: | ||
</source> | </source> | ||
− | + | ||
− | + | <! removed transcluded page call, red link never existed > | |
− | < | ||
− | |||
===Examples=== | ===Examples=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=positions | category=positions | ||
category=JHtmlList | category=JHtmlList | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API16]] |
Latest revision as of 20:46, 24 March 2017
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Select list of positions - generally used for location of images
<! removed transcluded page call, red link never existed >
Syntax[edit]
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[edit]
libraries/joomla/html/html/list.php
Importing[edit]
jimport( 'joomla.html.html.list' );
Source Body[edit]
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[edit]
Code Examples[edit]