Body: <p>Good afternoon,</p>
  
  <p>Is it possible to have a next prev button to cycle through a number of matrix blocks within a single entry and show the blocks content individually on screen? The block contains an entry from another channel.</p>
  
  <p>If so, can someone point me in the direction of docs for it as Im struggling to find at the moment.</p>
  
  <p>Many thanks.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-20T10:49:27.563Z
Comments.Text: not sure i follow. do you want to have some kind of pagination for matrix blocks where one block = single page?
Comments.UserDisplayName: Piotr Pogorzelski
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-20T12:01:49.140Z
Comments.Text: indeed, so one block references an entry from another channel. I have 12 blocks I want to paginate with next/prev.  in the same way normal entry pagination happens with in channel entry query, just restricted to the entries found in the matrix blocks
Comments.UserDisplayName: user9822
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-21T21:35:40.177Z
Comments.Text: OK, so you want to loop through entries that were used in matrix field. In that case you can just construct entry query and use `relatedTo` parameter that will get all entries related to entry that has this matrix field. And then just paginate results using `paginate` function.
Comments.UserDisplayName: Piotr Pogorzelski
Tags: <matrix><blocks>
Title: Matrix Block query next prev
ThreadText: # Matrix Block query next prev
  
  (Asked by: username_0 on 2019-06-20)
  
  Good afternoon,
  
  Is it possible to have a next prev button to cycle through a number of matrix blocks within a single entry and show the blocks content individually on screen? The block contains an entry from another channel.
  
  If so, can someone point me in the direction of docs for it as Im struggling to find at the moment.
  
  Many thanks.
  
  **Tags:** matrix, blocks
  
  > **Comments:**
  > **username_1**: not sure i follow. do you want to have some kind of pagination for matrix blocks where one block = single page?  
  > **username_0**: indeed, so one block references an entry from another channel. I have 12 blocks I want to paginate with next/prev.  in the same way normal entry pagination happens with in channel entry query, just restricted to the entries found in the matrix blocks  
  > **username_1**: OK, so you want to loop through entries that were used in matrix field. In that case you can just construct entry query and use `relatedTo` parameter that will get all entries related to entry that has this matrix field. And then just paginate results using `paginate` function.  
  
  ---
  
  ## 0 answers
  
  