mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: missing category from title in non-js view
This commit is contained in:
parent
b77017abce
commit
90b85e5b23
2 changed files with 9 additions and 1 deletions
|
@ -61,4 +61,4 @@
|
|||
image: @topic_view.image_url) %>
|
||||
<% end %>
|
||||
|
||||
<% content_for(:title) { @topic_view.title } %>
|
||||
<% content_for(:title) { "#{@topic_view.page_title}" } %>
|
||||
|
|
|
@ -131,6 +131,14 @@ class TopicView
|
|||
@topic.relative_url
|
||||
end
|
||||
|
||||
def page_title
|
||||
title = @topic.title
|
||||
unless @topic.category_id == SiteSetting.uncategorized_category_id
|
||||
title += " - #{topic.category.name}"
|
||||
end
|
||||
title
|
||||
end
|
||||
|
||||
def title
|
||||
@topic.title
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue