I have to Go Template file. I need to pass some value from one template to another. IE
Template A have two variable with .Name and .Type. The values are passing from go code with ctx.Data. Template A references Template B with
{{ template "B" . }}
But in Template B. .Name and .Type are not having the same name. I can not change Template B s variable references because Tempalte B is used directly with those variable. Template B looks like this.
Username : {{ .UserName }}
Type : {{ .UserType }}
Now my question is how can i change the .Name in template A to .UserName?
{{ tempalte "B" .Name as .UserName }}
is there something like this????