JPagination/getLimitBox
From Joomla! Documentation
< API15:JPagination
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Creates a dropdown box for selecting how many records to show per page
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
getLimitBox()
Returns[edit]
string The html for the limit # input box
Defined in[edit]
libraries/joomla/html/pagination.php
Importing[edit]
jimport( 'joomla.html.pagination' );
Source Body[edit]
function getLimitBox()
{
global $mainframe;
// Initialize variables
$limits = array ();
// Make the option list
for ($i = 5; $i <= 30; $i += 5) {
$limits[] = JHTML::_('select.option', "$i");
}
$limits[] = JHTML::_('select.option', '50');
$limits[] = JHTML::_('select.option', '100');
$limits[] = JHTML::_('select.option', '0', JText::_('all'));
$selected = $this->_viewall ? 0 : $this->limit;
// Build the select list
if ($mainframe->isAdmin()) {
$html = JHTML::_('select.genericlist', $limits, 'limit', 'class="inputbox" size="1" onchange="submitform();"', 'value', 'text', $selected);
} else {
$html = JHTML::_('select.genericlist', $limits, 'limit', 'class="inputbox" size="1" onchange="this.form.submit()"', 'value', 'text', $selected);
}
return $html;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]