-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Context detection for Query block #30369
Labels
[Block] Query Loop
Affects the Query Loop Block
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Enhancement
A suggestion for improvement.
Comments
ntsekouras
added
[Feature] Full Site Editing
[Block] Query Loop
Affects the Query Loop Block
labels
Mar 30, 2021
This was referenced Apr 18, 2021
This was referenced May 26, 2021
This was referenced Jul 2, 2021
Merged
annezazu
added
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
and removed
[Feature] Full Site Editing
labels
Jul 24, 2023
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Query Loop
Affects the Query Loop Block
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Enhancement
A suggestion for improvement.
We need to find a way to detect the context a
Query
block 'lives' and handle any settings needed appropriately. Bycontext
I mean FSE context (site-editor) or a page/post (post-editor). Moreover is valuable to even know the kind of template we are on FSE context (related: #29438).Noting that we'll also have to take into account what happens when we are in
post-editor
and weedit the template
from there.There is an
inherit
property inQuery
which defaults totrue
and with that set, the Query'squery
for fetching results is inherited from the global query. In a single page there is no much use in having an inherit Query (doesn't fetch anything), but instead a custom one. On the other hand in anarchive
orindex
template proper results are shown without taking into account any other previously explicitly set options (like the number of posts).Some prior art is here: #27972, where
templateSlug
is passed as context and is used for now inQueryLoop
to set the properpostType
if we are in an archive template.The text was updated successfully, but these errors were encountered: