mirror of
https://github.com/discourse/discourse.git
synced 2025-06-17 03:13:48 +08:00
FIX: missing category from title in non-js view
This commit is contained in:
@ -61,4 +61,4 @@
|
|||||||
image: @topic_view.image_url) %>
|
image: @topic_view.image_url) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% content_for(:title) { @topic_view.title } %>
|
<% content_for(:title) { "#{@topic_view.page_title}" } %>
|
||||||
|
@ -131,6 +131,14 @@ class TopicView
|
|||||||
@topic.relative_url
|
@topic.relative_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def page_title
|
||||||
|
title = @topic.title
|
||||||
|
unless @topic.category_id == SiteSetting.uncategorized_category_id
|
||||||
|
title += " - #{topic.category.name}"
|
||||||
|
end
|
||||||
|
title
|
||||||
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
@topic.title
|
@topic.title
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user