Update conditional in template for gid