updates
This commit is contained in:
1 parent
8393244e9d
commit
e137f46169
7 files changed
+157
-64
No files matched your search
@@ -49,6 +49,17 @@ func (p PageInfo) BreadcrumbMap() map[string]string {
|
||||
return result
|
||||
}
|
||||
|
||||
// PreviousLink returns the path of the previous folder
|
||||
func (p PageInfo) PreviousLink() string {
|
||||
parts := strings.Split(p.Path, "/")
|
||||
|
||||
if len(parts) <= 1 {
|
||||
return ""
|
||||
}
|
||||
|
||||
return parts[len(parts)-2]
|
||||
}
|
||||
|
||||
// PrintAsHTML formats the page in HTML and executes the template
|
||||
func (p Page) PrintAsHTML(w http.ResponseWriter, templates ...string) (int, error) {
|
||||
templates = append(templates, "base")
|
||||
|
||||
Reference in new issue
Block a user