pages

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 19 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 CopyPage added in v1.4.0

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

CopyPage copies a page.

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 AddDirectoryData added in v1.3.0

type AddDirectoryData struct {
	Lang           string
	Directories    []shared.Directory
	SelectionField string
	SelectionID    string
	Name           string
	Selected       string
	Errors         map[string]string
}

AddDirectoryData is the data for the directory form.

type CopyPageData added in v1.4.0

type CopyPageData struct {
	Lang   string
	Path   string
	Name   string
	Errors map[string]string
}

CopyPageData is the data for the copy form.

type EditDirectoryData added in v1.3.0

type EditDirectoryData struct {
	Lang           string
	Directories    []shared.Directory
	SelectionField string
	SelectionID    string
	Name           string
	Selected       string
	Path           string
	Errors         map[string]string
}

EditDirectoryData is the data for the directory form.

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
	Directories    []shared.Directory
	SelectionField string
	SelectionID    string
	Name           string
	PagePath       map[string]string
	Cache          bool
	Sitemap        float64
	Handler        string
	Path           string
	Selected       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