From 125ac9a2040e43113d95dd8b1416e8dcfe274e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 18 Mar 2013 19:24:27 +0100 Subject: [PATCH] provide a better title on topic pages for crawlers --- app/views/layouts/application.html.erb | 2 +- app/views/topics/show.html.erb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 63457f65f..6a905f1fe 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -2,7 +2,7 @@ - <%=t :title%> + <%= content_for?(:title) ? yield(:title) + ' - ' + t(:title) : t(:title) %> diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 3c3094ca0..679e6fcc8 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -28,3 +28,5 @@ description: @topic_view.summary, image: @topic_view.image_url) %> <% end %> + +<% content_for(:title) { @topic_view.title } %> \ No newline at end of file