× If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html

limitbox default

More
6 years 3 months ago #4628 by Ian
limitbox default was created by Ian
Hi Joodb, I've been testing Joodatabase in Joomla3 for a few weeks now and it has worked very well and proven to be extremely useful. I did have one question about one feature.
I am using the display output on a touchscreen, and it turns out I need to limit the default number of items displayed.

With the limitbox, the current default is 10 entries, and I would like to have just 8 entries listed. The limitbox feature allows changes, but only in increments of 5.

Is there a way to change the *default* number of items displayed (to 8 for example)?
Thanks very much,
Ian

Please Log in to join the conversation.

More
6 years 3 months ago - 6 years 3 months ago #4629 by Dirk
Replied by Dirk on topic limitbox default
You could change the amount of entries per page by changing the limit option to 8 in the menu settings if your joodb catalog entry.

But this does not affect the default limit select entries.

Joodb uses the Joomla-Pagination Class Joomla\CMS\Pagination
Function getLimitBox.

If you want really want to change this you should write a joodb plugin and replace the limitbox command in the template. Only works with the pro version.
Plugin /components/com_joodb/plugins/climit.php to call with
{joodb climit} instead of {joodb limitbox}
<?php
defined('_JEXEC') or die('Restricted access');
for ($i = 8; $i <= 32; $i += 8)	{
	$limits[] = JHtml::_('select.option', "$i");
}
$selected = $this->state->get('limit');
$output .=JHtml::_('select.genericlist',$limits,'limit',
	'class="inputbox input-mini" size="1" onchange="this.form.submit()"',
	'value','text',$selected);
Last edit: 6 years 3 months ago by Dirk.
The following user(s) said Thank You: Ian

Please Log in to join the conversation.

More
6 years 3 months ago #4632 by Ian
Replied by Ian on topic limitbox default
Hi Dirk,
I didn't notice the Menu->Options->Limit field earlier. That's just what I was looking for.
Thanks very much for your help.

I've found JooDb to be a very important addition to my Joomla toolkit!
Thanks again,
Ian

Please Log in to join the conversation.

Moderators: Dirkjoest