API16:JHtmlMenu/ordering
From Joomla! Documentation
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 Menu Ordering
Description:JHtmlMenu/ordering
Syntax
static ordering(&$row, $id)
| Parameter Name | Default Value | Description |
|---|---|---|
| &$row | ||
| $id |
Defined in
libraries/joomla/html/html/menu.php
Importing
jimport( 'joomla.html.html.menu' );
Source Body
public static function ordering(&$row, $id) { $db = &JFactory::getDbo(); if ($id) { $query = 'SELECT ordering AS value, title AS text' . ' FROM #__menu' . ' WHERE menutype = '.$db->Quote($row->menutype) . ' AND parent_id = '.(int) $row->parent_id . ' AND published != -2' . ' ORDER BY ordering'; $order = JHtml::_('list.genericordering', $query); $ordering = JHtml::_( 'select.genericlist', $order, 'ordering', array('list.attr' => 'class="inputbox" size="1"', 'list.select' => intval($row->ordering)) ); } else { $ordering = '<input type="hidden" name="ordering" value="'. $row->ordering .'" />'. JText::_('JCOMMON_NEWITEMSLAST_DESC'); } return $ordering; }
[Edit See Also] SeeAlso:JHtmlMenu/ordering
Examples
<CodeExamplesForm />
