FEATURE: add setting to omit category name from topic page title tag

This commit is contained in:
Neil Lalonde 2016-04-11 16:44:10 -04:00
parent 6ee11adf58
commit a299231f9a
3 changed files with 5 additions and 1 deletions

View File

@ -1239,6 +1239,8 @@ en:
read_time_word_count: "Word count per minute for calculating estimated reading time."
topic_page_title_includes_category: "Topic page title includes the category name."
full_name_required: "Full name is a required field of a user's profile."
enable_names: "Show the user's full name on their profile, user card, and emails. Disable to hide full name everywhere."
display_name_on_posts: "Show a user's full name on their posts in addition to their @username."

View File

@ -1091,6 +1091,8 @@ uncategorized:
default: 500
client: true
topic_page_title_includes_category: true
user_preferences:
default_email_digest_frequency:
enum: 'DigestEmailSiteSetting'

View File

@ -133,7 +133,7 @@ class TopicView
def page_title
title = @topic.title
if @topic.category_id != SiteSetting.uncategorized_category_id && @topic.category_id && @topic.category
if SiteSetting.topic_page_title_includes_category && @topic.category_id != SiteSetting.uncategorized_category_id && @topic.category_id && @topic.category
title += " - #{topic.category.name}"
end
title