galleries template enhancement