+extra page table

This commit is contained in:
Simon Martens
2026-01-14 16:36:23 +01:00
parent ca2df2da8a
commit 941ecbecaf
6 changed files with 126 additions and 46 deletions

View File

@@ -18,6 +18,14 @@ func (p *Page) URL() string {
return p.GetString(URL_FIELD)
}
func (p *Page) Title() string {
return p.GetString(TITLE_FIELD)
}
func (p *Page) SetTitle(title string) {
p.Set(TITLE_FIELD, title)
}
func (p *Page) SetURL(url string) {
p.Set(URL_FIELD, url)
}

View File

@@ -155,6 +155,12 @@ func Data_All(app core.App) ([]*Data, error) {
return data, err
}
func Pages_All(app core.App) ([]*Page, error) {
pages := make([]*Page, 0)
err := app.RecordQuery(PAGES_TABLE).All(&pages)
return pages, err
}
func Html_All(app core.App) ([]*HTML, error) {
html := make([]*HTML, 0)
err := app.RecordQuery(HTML_TABLE).All(&html)