Skip to content
This repository was archived by the owner on Aug 10, 2021. It is now read-only.

Make header, footer and sidebar links nofollow #158

Open
wants to merge 2 commits into
base: 2-1-stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/views/spree/static_content/_static_content_list.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% if page.foreign_link.present? %>
<li class='not'><%= link_to page.title, page.foreign_link, {:target => "_blank"} %></li>
<li class='not'><%= link_to page.title, page.foreign_link, {:target => "_blank", :ref => "nofollow"} %></li>
<% else %>
<% page_uri = Rails.application.routes.named_routes[:spree].path.spec.to_s == '/' ? page.slug : Rails.application.routes.named_routes[:spree].path.spec.to_s + page.slug %>
<li class=<%=(request.fullpath.gsub('//','/') == page_uri) ? 'current' : 'not'%>><%= link_to page.title, page_uri %></li>
<li class=<%=(request.fullpath.gsub('//','/') == page_uri) ? 'current' : 'not'%>><%= link_to page.title, page_uri, :rel => "nofollow" %></li>
<% end %>