I want to output an iterative list of:
<div class='X'> //or plain <div> depending on boolean X
<div class='d1'>
<div class='d2'>
...
</div>
</div>
</div>
The Jade script is:
each r in rList
-if (X)
div.X
div.d1
div.d2
-else
div
div.d1
div.d2
How do I do it with just one set of d1
and d2
which are the same in both situations?