Jump to content

How do I set the number of product listings pagination?


Recommended Posts

I need to increase the default number of product listings displayed from 10 to 25, how do I achieve this?

I tried modifying the following two files, but it doesn't work.

/templates/six/includes/tablelist.tpl

        "lengthMenu": [
            [25, 50, 100, -1],
            [25, 50, 100, "{$LANG.tableviewall}"]
        ],

/templates/six/includes/js/scripts.js

	"aLengthMenu": [ 25, 50, 100, 150 ],

Maybe I should modify the /templates/six/clientareaproducts. tpl file and add the lengthMenu parameter to the .DataTable()?

Edited by Lorraine1996
Link to comment
Share on other sites

6 hours ago, Lorraine1996 said:

Maybe I should modify the /templates/six/clientareaproducts. tpl file and add the lengthMenu parameter to the .DataTable()?

it's not so much lengthmenu as that just changes the values/labels in the pagination dropdown without changing the default number of results on the initial page..

so if it's just a case of wanting to show 25 results per page instead of 10, and given that you've already modified the clientareaproducts.tpl template, then I would change...

table.draw();

to...

table.page.len(25).draw();

and that should change the number of results per page - and because 25 is already in the default pagination dropdown, it should show 25 there too without the need to modify further files.

Link to comment
Share on other sites

26 minutes ago, brian! said:

it's not so much lengthmenu as that just changes the values/labels in the pagination dropdown without changing the default number of results on the initial page..

so if it's just a case of wanting to show 25 results per page instead of 10, and given that you've already modified the clientareaproducts.tpl template, then I would change...


table.draw();

to...


table.page.len(25).draw();

and that should change the number of results per page - and because 25 is already in the default pagination dropdown, it should show 25 there too without the need to modify further files.

Thanks, it worked perfectly!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated