Edit page title for tags.

This commit is contained in:
BoHung Chiu 2021-04-09 17:54:11 +08:00
parent d0331d58c1
commit 1d76ff87b7
1 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,9 @@ class AnnouncementsController < ApplicationController
if (params['category'] != page.categories rescue true) if (params['category'] != page.categories rescue true)
@annc_page_title = Category.find(Array(params['category']).first).title rescue nil @annc_page_title = Category.find(Array(params['category']).first).title rescue nil
end end
print params['category'] if (params["tags"] != page.tags rescue true)
@annc_page_title = Tag.find(Array(params['tags']).first).name rescue nil
end
{ {
"announcements" => anns, "announcements" => anns,
"extras" => { "extras" => {