{{ if and (ne (.Get "number") "") (ne (.Get "number") nil) }} {{ $filename := add (add "shortcodes/paragraph-" (.Get "number")) ".json" }} {{ with .Site.GetPage .Page.File.Path}} {{ $resource := (.Resources.GetMatch $filename).RelPermalink }} {{ $fields := getJSON "content" $resource }}
{{ if and (ne $fields.title "") (ne $fields.title nil) }}

{{ $fields.title }}

{{ end }} {{ range $fields.paragraphs }}

{{ . }}

{{ end }}
{{ end }} {{ else }}
{{ if and (ne (.Get "title") "") (ne (.Get "title") nil) }}

{{ .Get "title" }}

{{ end }}

{{ .Get "text" }}

{{ end }}