Welcome, Guest
Username: Password: Remember me
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
  • Page:
  • 1

TOPIC:

limitbox default 3 years 11 months ago #4628

  • Ian
  • Ian's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 0
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 or Create an account to join the conversation.

limitbox default 3 years 11 months ago #4629

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1186
  • Karma: 21
  • Thank you received: 225
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);
The following user(s) said Thank You: Ian

Please Log in or Create an account to join the conversation.

Last edit: by Dirk.

limitbox default 3 years 11 months ago #4632

  • Ian
  • Ian's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 0
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 or Create an account to join the conversation.

  • Page:
  • 1
Moderators: Dirkjoest