Query for enabled categories In a template, I want to show only enabled categories. I can't figure out how to filter the returned categories by only enabled ones, without doing it in the for loop.

This works:

{% for category in craft.categories.level(1) if category.enabled %}
  # only enabled categories
{% endfor %}


but instantiates the disabled categories, even though they won't be used.
Something like this should work:

% for category in craft.categories.level(1).enabled(true) %}
    # only enabled categories
{% endfor %}