This is a cheesy hack attempt at processing an xtemplate. If we come up with a better engine for that, replace this code with a call to it. In the meantime, you can override this method to do custom rendering in your module.