From cf7a3e74ee67fa8ea1774dd394b73cf9f2214c93 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 12 May 2014 10:50:08 -0400 Subject: [PATCH] In web crawler mode, don't show a previous link on a page with 0 results. Google will index those pages and keep following the prev links. --- app/views/topics/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index e4eaf680dbc..c2626eb96e4 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -21,7 +21,7 @@

- <% if @topic_view.prev_page %> + <% if @topic_view.posts.length > 0 && @topic_view.prev_page %> <%= link_to t(:prev_page), @topic_view.prev_page_path, rel: 'prev' %> <% end %> <% if @topic_view.next_page %>