Skip to content

Instantly share code, notes, and snippets.

@curtisblackwell
Created August 13, 2011 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtisblackwell/1143472 to your computer and use it in GitHub Desktop.
Save curtisblackwell/1143472 to your computer and use it in GitHub Desktop.
eecms: canonical uris with stash and switchee
{exp:stash:set
name = "canonical_uri"
save = "yes"
refresh = "525600"
}{exp:switchee variable="{last_segment}"}{case value="" default="yes"}{/case}{case value="{segment_1}"}/{segment_1}{/case}{case value="{segment_2}"}/{segment_1}/{segment_2}{/case}{case value="{segment_3}"}/{segment_1}/{segment_2}/{segment_3}{/case}{/exp:switchee}{/exp:stash:set}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment