17 lines
No EOL
562 B
HTML
17 lines
No EOL
562 B
HTML
{{ $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 }}
|
|
<h2>Page Save Error</h2>
|
|
<span class="adapter-error">There was an error saving the page: {{ ($saveErr).Error }}</span>
|
|
{{ else }}
|
|
<h2>Page Saved</h2>
|
|
<span class="adapter-success">Page '{{ $title }}' saved successfully</span>
|
|
{{ end }}
|
|
|
|
{{ template "footer" . }} |