Actions

API15

JHTMLList/positions

From Joomla! Documentation

< API15:JHTMLList
Revision as of 13:30, 12 May 2013 by JoomlaWikiBot (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

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

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

function positions( $name, $active = NULL, $javascript = NULL, $none = 1, $center = 1, $left = 1, $right = 1, $id = false )
{
        if ( $none ) {
                $pos[] = JHTML::_('select.option',  '', JText::_( 'None' ) );
        }
        if ( $center ) {
                $pos[] = JHTML::_('select.option',  'center', JText::_( 'Center' ) );
        }
        if ( $left ) {
                $pos[] = JHTML::_('select.option',  'left', JText::_( 'Left' ) );
        }
        if ( $right ) {
                $pos[] = JHTML::_('select.option',  'right', JText::_( 'Right' ) );
        }
 
        $positions = JHTML::_('select.genericlist',   $pos, $name, 'class="inputbox" size="1"'. $javascript, 'value', 'text', $active, $id );
 
        return $positions;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />