pages

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDirectory

func AddDirectory(w http.ResponseWriter, r *http.Request)

AddDirectory creates a new subdirectory.

func DeleteDirectory

func DeleteDirectory(w http.ResponseWriter, r *http.Request)

DeleteDirectory deletes a directory.

func DeletePage

func DeletePage(w http.ResponseWriter, r *http.Request)

DeletePage deletes a page.

func EditDirectory

func EditDirectory(w http.ResponseWriter, r *http.Request)

EditDirectory changes the name of a directory.

func Init

func Init(cms *cms.CMS)

Init initializes the template cache.

func Page

func Page(w http.ResponseWriter, r *http.Request)

Page renders the page details.

func Pages

func Pages(w http.ResponseWriter, r *http.Request)

Pages renders the pages management dialog.

func SaveJSON

func SaveJSON(w http.ResponseWriter, r *http.Request)

SaveJSON renders a JSON editor for the given page and saves it.

func SavePage

func SavePage(w http.ResponseWriter, r *http.Request)

SavePage creates or updates a page.

Types

type Entry

type Entry struct {
	Name     string
	Path     string
	IsDir    bool
	Children []Entry
}

Entry is a content directory or page.

type SavePageData

type SavePageData struct {
	Admin     bool
	Lang      string
	Name      string
	PagePath  map[string]string
	Cache     bool
	Sitemap   float64
	Handler   string
	Path      string
	Header    map[string]string
	Errors    map[string]string
	New       bool
	Saved     bool
	Languages map[string]iso6391.Language
}

SavePageData is the data for the page form.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL