warehost-web current menu
This commit is contained in:
parent
0d2556d491
commit
bca651eece
|
@ -77,6 +77,7 @@ func handlerfunc(w http.ResponseWriter, r *http.Request) {
|
||||||
menus = web.BuildMenuTree(menus)
|
menus = web.BuildMenuTree(menus)
|
||||||
page := &web.Page{WebsiteID: website.ID, MenuID: menu.ID}
|
page := &web.Page{WebsiteID: website.ID, MenuID: menu.ID}
|
||||||
dbconnection.Where(page).Find(page)
|
dbconnection.Where(page).Find(page)
|
||||||
|
page.Menu = menu
|
||||||
|
|
||||||
unsafe := blackfriday.MarkdownCommon([]byte(page.Content))
|
unsafe := blackfriday.MarkdownCommon([]byte(page.Content))
|
||||||
page.Content = string(bluemonday.UGCPolicy().SanitizeBytes(unsafe))
|
page.Content = string(bluemonday.UGCPolicy().SanitizeBytes(unsafe))
|
||||||
|
|
Reference in New Issue