{{ define "blocks" }} {{ if .Fields }}
{{ end }} {{- range $key, $value := .Fields }} {{- if eq $value.Parent.Type "array" }}
{{- template "value" $value }}
close
{{- else }}
{{ template "value" $value }}
close
{{- end }} {{- end }} {{- if .Fields }}
{{ end }} {{- range $key, $value := .Arrays }} {{- template "fielset" $value }} {{- end }} {{- range $key, $value := .Objects }} {{- template "fielset" $value }} {{- end }} {{ end }} {{ define "value" }} {{- if eq .HTMLType "textarea" }} {{- else if eq .HTMLType "datetime" }} {{- else }} {{- end }} {{ end }} {{ define "fielset" }}
{{- if not (eq .Title "") }}

{{ .Title }}

{{- end }}
add
close
{{- template "blocks" .Content }}
{{ end }}