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

{% setcontent %} filtering options #1610

Closed
I-Valchev opened this issue Jul 6, 2020 · 3 comments
Closed

{% setcontent %} filtering options #1610

I-Valchev opened this issue Jul 6, 2020 · 3 comments

Comments

@I-Valchev
Copy link
Member

I-Valchev commented Jul 6, 2020

The following should work:

{% setcontent myevents = 'events' where { categories: 'music' } %} {# THIS WORKS #}
{% setcontent pages = 'pages' where { author: '1 OR 4' } %}
{% setcontent pages = 'pages' where { id: '>5 AND < 10' } %}
@I-Valchev I-Valchev added this to the Bolt 4.0.0 stable milestone Jul 6, 2020
@bobdenotter
Copy link
Member

{% setcontent pages = 'pages' where { author: '1 OR 4' } %}

You can use {% setcontent pages = 'pages' where { author: '1 || 4' } %}

{% setcontent pages = 'pages' where { id: '>5 AND < 10' } %}

You can use {% setcontent pages = 'pages' where { id: '>5 && < 10' } printquery %}

SELECT content FROM Bolt\Entity\Content content WHERE content.contentType = :ct0 AND ((content.id > :id_1 AND content.id < :id_2) AND content.status = :status_1) ORDER BY content.publishedAt DESC

    ct0: pages
    id_1: 5
    id_2: 10
    status_1: published

(even with that superfluous space, which was fixed in #1621)

@bobdenotter
Copy link
Member

This probably needs to be documented better, though.. :-)

@I-Valchev
Copy link
Member Author

I'm pretty sure this is (by now) explained in the docs. Let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants