Lorraine1996 Posted June 7, 2020 Share Posted June 7, 2020 (edited) 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 June 7, 2020 by Lorraine1996 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 7, 2020 Share Posted June 7, 2020 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. 0 Quote Link to comment Share on other sites More sharing options...
Lorraine1996 Posted June 7, 2020 Author Share Posted June 7, 2020 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! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.