Generating template preview