Skip to content

Instantly share code, notes, and snippets.

@yekenuk yekenuk/Nesting [wlt-if]
Last active Sep 4, 2017

Embed
What would you like to do?
/*
Below is an example (not the best one) but an example none the less!
*/
[wlt-if field="is-logged-in"]
Great you're logged in...
[wlt-if-1 field="height"]
... and you have added a height.
[wlt-if-2 field="weight" operator="not-exists"]
... or a weight entry.
[/wlt-if-2]
[wlt-if-2 field="weight,height" operator="not-exists"]
We need these fields to calculate your BMI!
[else-2]
Great, we can calculate your BMI!
[wlt-recent-bmi]
[wlt-if-3 field="bmr"]
While we're here, here is your BMR! [wlt-bmr]
[/wlt-if-3]
[/wlt-if-2]
[else-1]
... and you haven't added your height.
[/wlt-if-1]
[else]
You need to log in!
[/wlt-if]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.