code: func (c *templateContext) wrapWithGetIf(p *parse.PipeNode) {
  	if len(p.Cmds) == 0 {
  		return
  	}
  
  	// getif will return an empty string if not evaluated as truthful,
  	// which is when we need the value in the with clause.
  	firstArg := parse.NewIdentifier("getif")
  	secondArg := p.CopyPipe()
  	newCmd := p.Cmds[0].Copy().(*parse.CommandNode)
  
  	// secondArg is a PipeNode and will behave as it was wrapped in parens, e.g:
  	// {{ getif (len .Params | eq 2) }}
  	newCmd.Args = []parse.Node{firstArg, secondArg}
  
  	p.Cmds = []*parse.CommandNode{newCmd}
  
  }
docs: // The truth logic in Go's template package is broken for certain values
  // for the if and with keywords. This works around that problem by wrapping
  // the node passed to if/with in a getif conditional.
  // getif works slightly different than the Go built-in in that it also
  // considers any IsZero methods on the values (as in time.Time).
  // See https://github.com/gohugoio/hugo/issues/5738