Client side pagination

Plugin Development
  • I was hoping that you guys might be able to point me in the right direction for handling custom pagination logic within a theme. I need to be able to define scroll up/scroll down events handlers so I can append or remove cards from the viewport based on direction of scrolling. I also want to disable pagination for certain categories regardless of user settings as these categories will only display topics as cards.


  • I was able to use Categories.setCategoryField to tag the categories that are customized with topic cards and then use that attribute in the templates.

Suggested Topics

  • 0 Votes
    2 Posts

    Hooks that are fired on the server side are only available for use for plugins in their server side code. Same for client side hooks they are only available for use in the client side code of plugins.

  • 0 Votes
    3 Posts

    @baris That's it! Thanks a lot.

  • 0 Votes
    1 Posts

    Good morning.

    First of all, I'm not a developer, and I'm sorry for every noob question that comes up here.

    Right now I'm playing around with the plugin/widget development. My goal is to have a widget which includes a search bar and a result div. Every change in the search input field fires a jquery request against a foreign api. Result is a big json object, containing an array of objects (example fields: image, name, uuid, type).

    I was able to put the plain results into the div. Now I want to process these results (splitting them up by type) and render them into beautiful partials.

    For your imagination:
    <search box>
    <box for type A with a list of entries> <box for type B with a list of entries>...

    Can anyone please give me a headstart?

    Thanks in advance.

  • 0 Votes
    2 Posts

    When you are on the category page you can access the topics with and on the topic page its

    There are also hooks fired whenever new topics/posts are added. They are $(window).trigger('action:topics.loaded', { topics: }); and $(window).trigger('action:posts.loaded', { posts: data.posts });

  • 0 Votes
    3 Posts

    @yariplus Thanks!