1

I have a component that displays a list of people. I want to limit the number of users displayed using pagination. My view therefore includes :

pagination- > getListFooter( ) <? Php echo $ this- > ? >

At the bottom of table, it displays all the records without limitation ( 20 for example).

So I change the method populateState model by adding :

$ Limit = $ app- > getUserStateFromRequest
( $ this- > context ' list.limit ' $ app- > getcfg ( ' list_limit ') . ) ;
$ This-> setState ( $ this- > context .'list.limit ', 20 ) ;

It still does not work. All records are still displayed. I am completely lost. Can someone put me on the right track?

  • Could you please format your code correctly so it's readable? – Lodder Mar 11 '16 at 13:55
  • The component displays a list of people , and of course I want to limit the display of the list using pagination. My view therefore includes : pagination- > getListFooter ( ) ? > At the bottom of table . it displays all records , without limitation ( 20 for example). So I change the method populateState model by adding : $ Limit = $ app- > getUserStateFromRequest ( $ this- > context ' list.limit ' $ app- > getcfg ( ' list_limit ') . ) ; $ This-> setState ( $ this- > context .'list.limit ', 20 ) ; It still does not work. I am completely lost . Someone to put me on the track ? – Jocya Oli Mar 11 '16 at 14:12
  • 2
    I can read your initial question, but was simply asking of you could click the "edit" button and format your code so it's readable. – Lodder Mar 11 '16 at 14:14
  • 1
    Hello @JocyaOli and welcome to JSE. It is unclear what you are asking, your title is bogus, and programming code snippets are unreadable. You can find help in proper use of markdown editor and formatting at joomla.stackexchange.com/help/formatting . Unless you improve your question, it might be flagged for closing. – Mikan Mar 11 '16 at 19:38
  • I have changed the question, thanks for your help #MirkoMikan – Jocya Oli Mar 13 '16 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.