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." 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." 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." 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." 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 default: 500
client: true client: true
topic_page_title_includes_category: true
user_preferences: user_preferences:
default_email_digest_frequency: default_email_digest_frequency:
enum: 'DigestEmailSiteSetting' enum: 'DigestEmailSiteSetting'

View File

@ -133,7 +133,7 @@ class TopicView
def page_title def page_title
title = @topic.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}" title += " - #{topic.category.name}"
end end
title title