{{ define "layout" }} {{ $root := . }} {{ template "navigation" . }} {{ if .File }} {{ end }} {{ template "root_link" . }} {{ range $index, $path := .Paths }} {{ if or (not $root.Request.Share.ID) (ne $index 0) }} {{ $fullPath := rebuildPaths $root.Paths $index }} / {{ $path }} {{ end }} {{ end }} {{ if .File }} ↳ {{ .File.Name }} {{ if or .Previous .Next }} {{ if .Previous }} {{ end }} {{ if .Next }} {{ end }} {{ end }} {{ end }} {{ template "message" .Message }} {{ end }}