add templates extension functionality