- one settings tile opening the golem15.sitemap.settings singleton - Files tab (site address, file size, S1 files partial), Additional addresses repeater, Content types tab built from signpost at boot - golem15_sitemap_types; a type switched off leaves the files (reason type) - a save validates (errors.*) and dispatches a rebuild after commit
28 lines
972 B
Go
28 lines
972 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.golem15.com/golem15/summercms/modules/lagoon"
|
|
)
|
|
|
|
// TypeSetting is the sitemap's setting of one signpost content type on
|
|
// golem15_sitemap_types, edited on the settings singleton's Content types
|
|
// tab: whether its records are listed, the file name part of its group
|
|
// (sitemap-<slug>-<n>.xml; "" means the default) and its heading per locale
|
|
// in the HTML sitemap. A type without a row is listed under its default
|
|
// slug.
|
|
type TypeSetting struct {
|
|
TypeKey string `gorm:"column:type_key;primaryKey"`
|
|
Include bool `gorm:"column:include"`
|
|
Slug string `gorm:"column:slug"`
|
|
Titles lagoon.Jsonable[map[string]string] `gorm:"column:titles"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at"`
|
|
}
|
|
|
|
func (TypeSetting) TableName() string { return "golem15_sitemap_types" }
|
|
|
|
func init() {
|
|
Register(TypeSetting{})
|
|
}
|