Some template enhancement for previewing