Ok, I'll look into the XF1 doc as a starting point. I have another quick question if you don't mind: apparently it's possible to use templating elements inside of HTML attributes. Is that something intended and supported or just an accidental unsupported feature?
Yeah you can open up some advanced expressions within templates (for a number of uses). The expressions are, in some ways, very similar to PHP syntax, though not everything is supported there.