Advanced template enhancement.