Hey there,
since one of the latest updates the query-block itself is responsible for holding and providing the context of the query (if i’m not wrong).
What i wanted to achieve now is conditionally output a whole section based on that query. It’s about Job-Postings and I only want to output the section (holding the job-postings but also the section container, heading and so on) if there are open jobs in that company.
In my understand I would have to create the following structure:
- Query
- Section
- Container
- Heading
- Separator (Div)
- Query Template
- Container
- Section
The Problem is, that the Query-Template Block only accepts the Query Block as Parent block, which doesn’t allow the nesting I want to achieve.
I could put create the following Structure, but then the Section and the container element (with assigned padding to it) would still produce some whitespace on my site:
- Section
- Container
- Query
- Heading
- Separator (Div)
- Query Template
- Query
- Container
Basically to achieve what I want to achieve, I have to put the query Template inside the Container here.
Please correct me if I’m overseeing anything @Louis (or anyone else ).
Cheers
Wolfgang