Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect Query loop blocks to enable other blocks to be placed in between a loop #61506

Open
cloudcreationsjess opened this issue May 8, 2024 · 0 comments
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@cloudcreationsjess
Copy link

cloudcreationsjess commented May 8, 2024

What problem does this address?

I often get designs where there are blocks in the middle of a query loop. For example, 6 posts in a grid and then a full-width newsletter subscribe section and then the post query grid continues on afterward. There is no way to connect query blocks to let them know about each other. This presents issues with pagination even if I set an offset. The first set of posts will show the posts already shown in the second query block when paginating. I don't want to use page templates or javascript as I want the client to be able to see and edit the blocks and change them within.

What is your proposed solution?

Allow query blocks to be aware of each other potentially through a backwards/skip offset. Example: you have 15 posts on a page with a newsletter section in between. In the editor You add a query block with 6 posts, then the newsletter block and then another query block with 9 posts (offset 6) and then the pagination block. For the first query block you are able to set a skip offset where it shows the first 6 posts then when paginating it skips 9 (or whatever # you have in second query block). For the second query block you can just use a normal offset.

Alternatively and possibly easier would be a setting where I can tie the second query block to use the same query as the first query block.

@cloudcreationsjess cloudcreationsjess added the [Type] Enhancement A suggestion for improvement. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

1 participant