{{ $slug := ((.Context).Value "params").Slug }}
{{ $deleteErr := ((.Context).Value "adapter").DeletePage $slug }}

{{ template "header" . }}

{{ if $deleteErr }}

  <h2>Deletion Error</h2>
  <span class="adapter-error">{{ ($deleteErr).Error }}</span>

{{ else }}

  <h2>Page Deleted</h2>
  <span class="adapter-success">Page at '{{ $slug }}' was deleted</span>

{{ end }}

{{ template "footer" . }}