templates changes in gallery boxes