Forum Discussion

kfox22's avatar
kfox22
Contributor
8 years ago

Widget/page with multiple paging items

I have created a freemarker widget for my users so they can see all of their content on the profile page.  It works great, the content is put into 3 categories, top-level content, replies or blogs.  The only issue I have is that I would like to make the size of the whole component similar (5 posts at a time) and would like to use paging to help with that.  I got paging to work, only to find out that I would only be able to page 1 type of post, and I wouldn't be able to do it to the others on that page (since it changed the URL).  Is there any way I can have multiple pageable items on one page?

  • Hi kfox22,

     

    yes it is possible, but requires some custom development. You can add the common paging component provided by Lithium and then handle the pagination using custom JavaScript.

     

    At first, you have to prevent the default page links from accessing their target and build the URL with some parameters, e.g.

     

    <URL>?new_tab_page=2&solved_tab_page=3#solved_tab

    Using AJAX and endpoints you will be able to handle the paging behavior for each of your categories separately.

     

    Hopefully, this information will help you to find a solution for your use case.

     

    Kind regards,

    Christian