Missing token cause error

11 views
Skip to first unread message

Paul Bowman

unread,
Feb 6, 2020, 10:22:02 AM2/6/20
to dotliquid
Hi,

When I render a template if the value is missing I get an error reported but the output is rendered correctly.

if I do something like:
{% if content.Field %}
{{ content.Field }}
{% endif %}
If content.Field is present it renders
If it is not present it still renders but I get an report content.Field could not be found
The same is true if I do 
"value" : "{{ content.Field }}"
If I understand the docs this should render to "value": "" if Field is not present.

Any help would be appreciated.

Thanks

Paul

David Burg

unread,
Jun 4, 2020, 1:22:32 PM6/4/20
to dotliquid
Paul, could you add more specifics for your issue, such as, can you reproduce this issue using the http://dotliquidmarkup.org/try-online ? Are you using dotLiquid in your own .NET app, in which case can you share a minimum reproduction app code (assuming it does not repro online)? Or you can provide a unit-test like the existing tests in the dot liquid repo to access variables. The unit tests can also help as ad-hoc documentation and how-to when the written doc falls short.

- David.
Reply all
Reply to author
Forward
0 new messages