#### This Page

# `filter` (`expr`)

- Method of Query

This filters a query further down by an Expression. Most expressions involve filtering by fields through F which allows you to perform comparisons with values that fields have.

Multiple filter calls can be chained as an alternative to using an `and` expression.

## Example

Here a basic example of how to filter something in a template:

    <ul>
    {% for item in this.children.filter(F.status == 'published') %}
      <li>{{ item.title }}</li>
    {% endfor %}
    </ul>

## Comments