Skip to content

Document that liquid filters are not alllowed in if - #521

Merged
ChristianTheConsultant merged 2 commits into
masterfrom
cj-documentation-liquid-filters-in-if
Sep 24, 2026
Merged

ChristianTheConsultant merged 2 commits into
masterfrom
cj-documentation-liquid-filters-in-if

Conversation

@ChristianTheConsultant

Copy link
Copy Markdown
Collaborator

No description provided.

Christian J and others added 2 commits September 22, 2026 15:20
Customers hit this when writing grain `when` conditions such as
`{% if .inputs.network_type | strip | downcase == "vlan" %}`. Liquid only
allows filters in output tags and in `assign`, so the expression fails to
evaluate and the grain is not gated as intended.

- Add a "Using Liquid filters in a condition" subsection under `when`,
  showing the invalid pattern and the `assign` workaround, plus an
  `allowed-values` alternative
- Note the same rule in the templating engine section
- Add the `assign` pattern to the input `visible` examples

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ChristianTheConsultant
ChristianTheConsultant merged commit 573ae7f into master Sep 24, 2026
1 check passed
@ChristianTheConsultant
ChristianTheConsultant deleted the cj-documentation-liquid-filters-in-if branch September 24, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant