Added support for sites that use custom templates