Actions

API16

JHtmlList/positions

From Joomla! Documentation

< API16:JHtmlList
Revision as of 17:50, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Select list of positions - generally used for location of images

[Edit Descripton]

Description:JHtmlList/positions

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;
}

[Edit See Also] SeeAlso:JHtmlList/positions

Examples

<CodeExamplesForm />