From d3f312a1e2e3f644bac121d62541e11e11e49407 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 21 Sep 2023 16:59:32 -0400 Subject: [PATCH] Use Chorus template (if configured) when filtering by language Ref T805 --- collections.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collections.go b/collections.go index f8d7498..c579df1 100644 --- a/collections.go +++ b/collections.go @@ -1155,7 +1155,11 @@ func handleViewCollectionLang(app *App, w http.ResponseWriter, r *http.Request) displayPage.PinnedPosts, _ = app.db.GetPinnedPosts(coll.CollectionObj, isOwner) displayPage.Monetization = app.db.GetCollectionAttribute(coll.ID, "monetization_pointer") - err = templates["collection"].ExecuteTemplate(w, "collection", displayPage) + collTmpl := "collection" + if app.cfg.App.Chorus { + collTmpl = "chorus-collection" + } + err = templates[collTmpl].ExecuteTemplate(w, "collection", displayPage) if err != nil { log.Error("Unable to render collection lang page: %v", err) }