You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 3, 2022. It is now read-only.
Lukas Jans edited this page Aug 28, 2019
·
2 revisions
Sections are great to define fallbacks in case there is no data.
You have already learned that regular sections with an empty context and inverted sections with a non-empty context will be removed. This behavior can be used to implement some sort of if...else-conditions in your template:
After rendering, only one message will remain depending on the value of login. Remember that the content of regular sections assigned to a non-empty context are rendered recursively using that context.
You can also check for the length of arrays. Compare the following inverted sections: