templates/cms_create.html (raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
{{ $slug := .FormValue "slug" }} {{ $title := .FormValue "title" }} {{ $content := .FormValue "content" }} {{ $createErr := ((.Context).Value "adapter").CreatePage "" $title $content }} {{ template "header" . }} {{ if $createErr }} <h2>Page Creation Error</h2> <span class="adapter-error">{{ ($createErr).Error }}</span> {{ else }} <h2>Page Created</h2> <span class="adapter-success">Page '{{ $title }}' created successfully</span> {{ end }} {{ template "footer" . }} |