Actions

API15

JHTMLList/specificordering

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

Build the select list for Ordering of a specified Table

[<! removed edit link to red link >]

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

Syntax

specificordering(&$row, $id, $query, $neworder=0)
Parameter Name Default Value Description
&$row
$id
$query
$neworder 0

Defined in

libraries/joomla/html/html/list.php

Importing

jimport( 'joomla.html.html.list' );

Source Body

function specificordering( &$row, $id, $query, $neworder = 0 )
{
        $db =& JFactory::getDBO();
 
        if ( $id ) {
                $order = JHTML::_('list.genericordering',  $query );
                $ordering = JHTML::_('select.genericlist',   $order, 'ordering', 'class="inputbox" size="1"', 'value', 'text', intval( $row->ordering ) );
        } else {
                if ( $neworder ) {
                        $text = JText::_( 'descNewItemsFirst' );
                } else {
                        $text = JText::_( 'descNewItemsLast' );
                }
                $ordering = '<input type="hidden" name="ordering" value="'. $row->ordering .'" />'. $text;
        }
        return $ordering;
}

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

Examples

<CodeExamplesForm />