Actions

API15

JHTMLList/specificordering

From Joomla! Documentation

< API15:JHTMLList
Revision as of 12:36, 25 March 2010 by Doxiki (Talk | contribs)

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

[Edit Descripton]

Description:JHTMLList/specificordering

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

[Edit See Also] SeeAlso:JHTMLList/specificordering

Examples

<CodeExamplesForm />