When I first saw below construct I immediately thought that depending on the ‘person’ condition either ‘Content Block’ or ‘Else Block’ will be “executed” - that is used inside the template.
But as it turns out these two block are ALWAYS given to the template and ‘person’ is not condition in any way. Instead person is just a parameter and it is up to specific template implementation to decide what to do with this parameter and how to apply it to Content and Else blocks. I find this to be very confusing syntax that looks like something that it is not.
So my question would be why this looks like it does? Am I missing something? Why is term “else” used?
Why instead we don’t have ability to define more of these blocks which are actually nothing more then parameters - each containing a block of HTML. Currently we are limiting number of HTML code parameters that Block Template can take to two parameters? This would be like having functions in JavaScript that can take maximum of two parameters. Why not, instead of {{else}} have something like {{param1}}, {{param2}}, etc.
Also this {{else}} looks like reference to helper? Is it? If it is not but it looks like it is that is also very confusing.
{{#myTemplate person}}
Content Block
{{else}}
Else Block
{{/myTemplate}}