roboconf-platform
roboconf-platform copied to clipboard
Templating language has no conditional expression ("if"-like)
It is impossible to expand a template block according to a complex condition (eg. "if Tomcat.port=8080 || Tomcat.ip=127.0.0.1"). The only check allowed is... whether a String is empty or not !
I have added a helper to select properties in maps.
Reading this issue makes me think we could indeed have a == operator that could be applied to keys or values in maps.
See http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/ We might also override the default "if" helper. Or rename it. Or choose another name for our mark-up.