jazonv/Segment — pull request #2 by onecsguy (2014-02-09 18:58:16+00:00)
Title: Alternative syntax for using negative num values to get segments from end of url.

I think this aligns better with the current api than my previous pull request and allows people to get single segments in reverse instead of `{segment}` returning the url.

This addition to Segment is in response to important yet missing Statamic core functionality of traversing up a url path.

{{ segment num="-1" url="/blog/categories/whiskey" }}
Outputs: categories

{{ segment:url num="-1" url="/blog/categories/whiskey" }}
Outputs: /blog/categories