factored out the need for amsterdam_pageTitle by having FrameTitle be a separate bit of metadata in AmContext

This commit is contained in:
2026-02-10 21:10:20 -07:00
parent 09842a91bd
commit f2b8b829aa
18 changed files with 65 additions and 46 deletions
+4 -4
View File
@@ -143,7 +143,7 @@ func FindPage(ctxt ui.AmContext) (string, any) {
ctxt.VarMap().Set("term", "")
}
ctxt.VarMap().Set("amsterdam_pageTitle", "Find")
ctxt.SetFrameTitle("Find")
ctxt.SetLeftMenu("top")
return "framed", "find.jet"
}
@@ -167,7 +167,7 @@ func Find(ctxt ui.AmContext) (string, any) {
ctxt.VarMap().Set("oper", oper)
term := ctxt.FormField("term")
ctxt.VarMap().Set("term", term)
ctxt.VarMap().Set("amsterdam_pageTitle", "Find")
ctxt.SetFrameTitle("Find")
ctxt.SetLeftMenu("top")
ofs, _ := ctxt.FormFieldInt("ofs")
if ctxt.FormFieldIsSet("search") {
@@ -315,7 +315,7 @@ func commonFindGetBackend(ctxt ui.AmContext) (string, any) {
}
ctxt.VarMap().Set("ofs", ofs)
ctxt.VarMap().Set("term", "")
ctxt.VarMap().Set("amsterdam_pageTitle", "Find Posts")
ctxt.SetFrameTitle("Find Posts")
return "framed", "find_posts.jet"
}
@@ -373,7 +373,7 @@ func FindPostsPageTopic(ctxt ui.AmContext) (string, any) {
func commonFindPostBackend(ctxt ui.AmContext, comm *database.Community, conf *database.Conference, topic *database.Topic) (string, any) {
term := ctxt.FormField("term")
ctxt.VarMap().Set("term", term)
ctxt.VarMap().Set("amsterdam_pageTitle", "Find Posts")
ctxt.SetFrameTitle("Find Posts")
ofs, _ := ctxt.FormFieldInt("ofs")
if ctxt.FormFieldIsSet("search") {
ofs = 0