diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2021-04-15 07:33:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 07:33:50 +0300 |
commit | 363251a517cf506cb017ef2471e74873f44eb61c (patch) | |
tree | 83e17d7d50371914b5ce5cb888ee10601599438a /layouts | |
parent | b73da986de95531b249461d675717f09343256a7 (diff) |
Improve presentation of template lookup order (#1382)
Closes #1374
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/datatable-filtered.html | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/layouts/shortcodes/datatable-filtered.html b/layouts/shortcodes/datatable-filtered.html index 576ddab6f..ff3f299bd 100644 --- a/layouts/shortcodes/datatable-filtered.html +++ b/layouts/shortcodes/datatable-filtered.html @@ -20,8 +20,19 @@ {{ range $k, $v := . }} {{ $.Scratch.Set $k $v }} {{ end }} - {{ range $fields }} - <td>{{ $.Scratch.Get . }}</td> + {{ range $k, $v := $fields }} + <td> + {{ $tdContent := $.Scratch.Get . }} + {{ if eq $k 3 }} + {{ printf "%v" $tdContent | + strings.ReplaceRE `\[` "<ol><li>" | + strings.ReplaceRE `\s` "</li><li>" | + strings.ReplaceRE `\]` "</li></ol>" | + safeHTML }} + {{ else }} + {{ $tdContent }} + {{ end}} + </td> {{ end }} </tr> {{ end }} |