update gallery template