2022-06-06 05:29:39 +00:00
|
|
|
{{ $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 }}
|
|
|
|
<span class="adapter-error">There was an error saving the page: {{ ($saveErr).Error }}</span>
|
|
|
|
{{ else }}
|
|
|
|
<span class="adapter-success">Page '{{ $title }}' saved successfully</span>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ template "footer" . }}
|