It seems rather odd that I can’t figure how to do this in mustache. Is it supported?
This is my sad attempt at trying:
{{#author}}
{{#avatar}}
<img src="https://stackoverflow.com/questions/6027525/{{avatar}}"/>
{{/avatar}}
{{#!avatar}}
<img src="/images/default_avatar.png" height="75" width="75" />
{{/avatar}}
{{/author}}
This obviously isn’t right, but the documentation doesn’t mention anything like this. The word “else” isn’t even mentioned 🙁
Also, why is mustache designed this way? Is this sort of thing considered bad? Is it trying to force me to set the default value in the model itself? What about the cases where that isn’t possible?