Welcome, Guest
Username: Password: Remember me

TOPIC: [ADDED] List limit

[ADDED] List limit 06 Dec 2012 21:27 #5877

  • fred2ric
  • fred2ric's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Hello,

I'm trying to deal with the "protected $_default_limit = null;" in the view.html.php file of my component but with no success. I want to have a no limit list of the data of my component but it remains predifined on 20. Any solution ?
The administrator has disabled public write access.

Re: List limit 07 Dec 2012 21:59 #5912

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Hi and welcome to the community.

It is possible that I forgot it in 2.0 beta.

Nice catch.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: List limit 09 Dec 2012 10:13 #5943

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Well.

Just added for you (in 2.0 of course):

In the concerned list model,
populateSate() function :
//ADD THIS
	$this->setState('list.limit.default', '0');
	
//BEFORE THIS
	parent::populateState('a.xxx', 'asc');

'0' is for 'All' in this example.

This example will set up a default list limit is unset by the user.


Now, if you want to absolutly force the limit :
	$this->setState('list.limit', '0');

Enjoy it ;-)
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

Re: List limit 15 Dec 2012 18:29 #6145

  • fred2ric
  • fred2ric's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
Really Cool, Thanks!
The administrator has disabled public write access.
Time to create page: 0.070 seconds

Get Started