nirvash/templates/cms_save.html

21 lines
530 B
HTML
Raw Permalink Normal View History

{{ $slug := ((.Context).Value "params").Slug }}
{{ $newSlug := .FormValue "slug" }}
{{ $title := .FormValue "title" }}
{{ $content := .FormValue "content" }}
{{ $saveErr := ((.Context).Value "adapter").SavePage $slug $newSlug $title $content }}
{{ template "header" . }}
{{ if $saveErr }}
2022-06-07 06:59:41 +00:00
<h2>Page Save Error</h2>
<span class="adapter-error">{{ ($saveErr).Error }}</span>
{{ else }}
2022-06-07 06:59:41 +00:00
<h2>Page Saved</h2>
<span class="adapter-success">Page '{{ $title }}' saved successfully</span>
{{ end }}
{{ template "footer" . }}