Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

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 ?

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

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

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

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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 following user(s) said Thank You: JoomGuy

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

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

Really Cool, Thanks!

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

  • Page:
  • 1
Time to create page: 0.062 seconds

  Excellent Tool ! This tool will save you a lot of time writing the same old structure. I've used others but this is really nice for a quick start. Makes a 3 hour task a 15 minute one. Thanks for this extension
dickrundell (JED)
         

Get Started