2022-06-06 05:29:39 +00:00
|
|
|
{{ $slug := .FormValue "slug" }}
|
|
|
|
{{ $title := .FormValue "title" }}
|
|
|
|
{{ $content := .FormValue "content" }}
|
|
|
|
{{ $createErr := ((.Context).Value "adapter").CreatePage "" $title $content }}
|
|
|
|
|
|
|
|
{{ template "header" . }}
|
|
|
|
|
|
|
|
{{ if $createErr }}
|
2022-06-07 06:59:41 +00:00
|
|
|
<h2>Page Creation Error</h2>
|
2022-06-06 05:29:39 +00:00
|
|
|
<span class="adapter-error">There was an error creating the page: {{ ($createErr).Error }}</span>
|
|
|
|
{{ else }}
|
2022-06-07 06:59:41 +00:00
|
|
|
<h2>Page Created</h2>
|
2022-06-06 05:29:39 +00:00
|
|
|
<span class="adapter-success">Page '{{ $title }}' created successfully</span>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ template "footer" . }}
|