nirvash/templates/cms_create.html

16 lines
516 B
HTML
Raw Normal View History

{{ $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>
<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>
<span class="adapter-success">Page '{{ $title }}' created successfully</span>
{{ end }}
{{ template "footer" . }}