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

No mention of 'default' filter on https://docs.bolt.cm/4.0/twig-components/filters #1160

Open
ghost opened this issue Jun 7, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 7, 2021

This page explains many Twig filters but doesn't mention the default filter.

The official Twig documentation page at https://twig.symfony.com/doc/3.x/filters/default.html is very helpful but it doesn't explain how an empty or missing parameter is treated, as in these constructs that I've seen in Bolt themes: {% if record|default() %} or {% if record|default %}.

So it would be good to include multiple examples, including the above.

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

No branches or pull requests

0 participants