Orchard CMS Taxonomy Term Autoroute Token Slug v2.0

发布于:
Orchard CMS

From :http://sheltonial.blogspot.com.au/2013/11/orchard-cms-taxonomy-term-autoroute.html

This is a new and improved solution to my original post http://sheltonial.blogspot.com.au/2013/10/orchard-cms-taxonomy-term-autoroute.html.

The purpose of this post is to provide a method of returning a full taxonomy term path slug as a token in Orchard CMS. I am currently using this solution in Orchard 1.7.1 as of changeset 91d0048f2796f093a8cefe2111ff013818d220fb.

 

The problem with the previous solution was that it only rendered the 1 selected taxonomy term into the token result, which was great if you were working with the root terms, but as soon as you went deeper it did not render the full taxonomy term path into the token result.

The following solution allows a full taxonomy term path to be slugified and rendered into a token result.