don't load foreach unless no template