Show all elements using printPageListWithNav()


I use printPageListWithNav() to manage paging in album view. It is fine.

Is there a way to switch paging view to display all elements (album+image) on one single page, with a link like "Show all" ?


  • acrylian Administrator, Developer

    I assume you mean a simple way by just setting one option, no. The number of albums/images per page is set via theme options that you could try to change temporary .Temporarily means not in the db since you don't want this to be a change for all users. See the doc for setOption()) .

    You would have to create a link with a $_GET like ?showall or $_POST request that returns to the page to do so. I have not tried this and some options cannot be changed temporarily.

    Another way is to create a custom theme page that display but that would not really be that elegant as it would leave the normal album context.

  • setOption() did the trick for me with a $_GET, this is fine, thank you @acrylian!

    Do you know how can I set a no limit to this option or do I need to give a high value like

    setOption('images_per_page', 1000, false);

    ? I have tried 0 or null but did not work.

  • acrylian Administrator, Developer
    edited May 2020

    No, that option itself does not support this, an "absurd" high value you likely never reach should work. Although the functions fetching items do support "all" there is no simple way to do this "from the outside", at leat offhand from memory.

    (Don't forget to sanitize your GET value if you submit any and use it somewhere).

Sign In or Register to comment.