Closed harrythompsondwp closed 1 year ago
Updated version attached with better guidance on data notation. i.e. {{data['name']}} is better than {{data.name}} as it allows for hyphens in the name tag. Conditional content v2.pdf
related: #110
I think we now have most of this in our guides:
Thanks @harrythompsondwp for the issue and the content!
Suggestion
Using condition content
As far as I can see there's no good guidance on using conditional content, using nunjucks syntax. But I've used and seen it used in quite a few GDS prototypes, and had to teach myself how to do it. I've written the attached guide for colleagues at Opencast, but I figure this would be a useful addition to the tutorials section of the kit. Happy for any of it to be adapted, but something along these lines would be helpful to include! Conditional content.pdf