Open annezazu opened 1 month ago
Hello I would like to work on this issue ?
I'm not sure this is a real issue. The fact that each "local query" or "custom query" uses a separate argument in the url is intended because you can have multiple local queries in the same page and the pagination shouldn't impact all of them at the same time.
For queries that "inherit" global queries, it's easier to use the permalinks because there can be only one global query per page.
I ran into this issue, and this is what our developer discovered:
/page/X
will show only when we activate the Inherit query from template
option in the Query Loop
block. It will render the pagination block using this condition. But when we do not use the inherit option, the pagination will use the format ?$page_key=%#%
as coded in line 48 of that same file.
I'd echo Riad above and I think we can close this one. I personally don't think there is a way to handle this differently..
I think we can make this look way better if we leverage the name
attribute of a query block so it doesn't look like a random query id. For example, I name my query block "latest news" and I'd get to see ?latest-news-page=2
.
I think we can make this look way better if we leverage the name attribute of a query block so it doesn't look like a random query id. For example, I name my query block "latest news" and I'd get to see ?latest-news-page=2.
That's an interesting idea, but despite some technical concerns which we could explore later (like ensuring uniqueness of names across all post content) , my main concern is:
?latest-news-page=2
is sharedI'd consider this a blocker, no? I'm not sure right now if we can work around it somehow..
Good point, but I don't think that's a blocker, sharing a paginated permalink like that and changing the query id would also "break". The worst outcome is also that the link won't paginate but the resource still loads.
sharing a paginated permalink like that and changing the query id would also "break".
That's true, but changing the block's name is easy without indicating 'breakage' (of the paginated links shared before), while query id can only be edited through the code editor. If we're not considering this a blocker, I guess it's open for exploration to make this happen.
When using the Query Loop block, the permalink structure changes from something more recognizable and coherent (
/page/2/
) to something like this structure?query-14-page=2
when you override certain simple settings to create a custom query. You can see an example of this here: https://block-museum.com/museum/ Here's a quick video:https://github.com/user-attachments/assets/e092b424-1f42-4051-a6a3-075bc916b8ba
This is a pretty drastic change when you might just be trying to change the number of posts shown or which posts are queried. Opening this issue to understand what can be done technically to allow for potentially more changes to the query loop block without losing the relationship to the permalink structure.