HSVT templates


Text that will appear in the user interface should be included in the HSVT file. For example, the pageTitle() and backLink() functions should be preferred to passing text in to the view from JavaScript.

Always prepare the text in your templates for internationalisation, except if you know it’ll never be needed because it’s a bespoke feature for a single client.


HSVT ignores whitespace, so use it to increase the clarity of your HTML structure. In particular, an angle bracket should always have whitespace around it.

  if(canEdit) {
      <a href="..."> i("Edit") </a>


HSVT files should be indented 2 spaces and follow the same conventions as JavaScript for control flow.