Last active
December 11, 2015 17:49
Revisions
-
ehoch revised this gist
Jan 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ [Alarm Grid](https://www.alarmgrid.com) will show you how to create canonical urls in Spree Commerce. This is only an example for products show. You must implement EVERYWHERE. -
ehoch revised this gist
Jan 25, 2013 . 3 changed files with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ - if @canonical_url = tag('link', :rel => 'canonical', :href => "http://" + Spree::Config[:site_url] + URI.parse(@canonical_url).path)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ Deface::Override.new(:virtual_path => 'spree/layouts/spree_application', :name => 'canonical_url', :insert_bottom => "[data-hook='inside_head']", :partial => 'shared/canonical_url') This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ module Spree ProductsController.class_eval do before_filter :show_filter, :only => :show def show_filter @canonical_url = spree.product_path(:id => @product.permalink) end end end -
ehoch revised this gist
Jan 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ [Alarm Grid](https://www.alarmgrid.com) will show you how to create canonical urls in Spree Commerce. -
ehoch renamed this gist
Jan 25, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ehoch revised this gist
Jan 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ Intro goes here[https://www.alarmgrid.com] -
ehoch created this gist
Jan 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Intro goes here