Pagination in repeating

Hey there, is there any pattern for pagination in vapid?

I learnt from docs that I can set limit and offset but I want also to change these values accroding to amount of posts I want to show

Thanks for help
Filip

Currently, repeating sections don’t have pagination, but it’s on our roadmap.

Thank you! Is your roadmap public? I would like to check other upcoming things.

It’s not, but it should be. Right now, some of it is being worked out on GitHub, and others are things that @naz and I have in Trello. We’ll update GitHub to consolidate, and give a clearer picture.

Hi @scott, is there any news about pagination?

Thanks,
Jonas

@jonasNobile Unfortunately, no. I haven’t been able to think of a good way to squeeze it into the existing templating language. I’m open to suggestions though.

I was thinking about using limit. Something like {{#section paintings multiply=true limit=8 pagination=true}} next 8 paintings would be available at /?page=2. There could be also {{#pagination paintings}} to show list of links to next pages.

So full code could look like:

<section class="paintings col-12">
  {{#section paintings multiply=true limit=8 pagination=true}}
    <article class="paintings__painting col-3">
       <a href="{{_permalink}}">
         <h3 class="paintings__painting__header">{{author}}</h3>
         {{painting type=image width=400 height=266}}
       </a>
     </article>
  {{/section}}
{{#pagination paintings}}
</section>

Interesting, I like it. I wonder if it would work with the current parser (which is kind of dumb and doesn’t really understand one tag’s relation to another). I’ll make a note to look into it.