Added IF[N]DEF conditional tests to the templating engine.