{{- $rows := "" -}} {{- $filename := .Get 0 -}} {{- $class := (cond (isset $.Params 1) (.Get 1) "No Param $1") -}} {{- $caption := (cond (isset $.Params 2) (.Get 2) "No Param $1") -}} {{- with .Page.Resources.Get $filename -}} {{- $options := dict "delimiter" "," -}} {{- $rows = .Content | transform.Unmarshal $options -}} {{- $headerRow := index $rows 0 -}} {{- $dataRows := after 1 $rows -}}
| {{ . }} | {{- end -}}
|---|
| {{ . | safeHTML }} | {{- end -}}
CSV file not found: {{ $filename }}
{{- end -}}