Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

JB Reverse Segments

Sometimes you don't care how many segments are in the url, you just care about two or three of them at the end. This extension allows you to easily access those by reversing the order in which you access them (counting from right to left).

Assuming the following url...
http://www.yourdomain.com/tvshows/scifi/stargate

Using ExpressionEngine...

{segment_1} = tvshows {segment_2} = scifi {segment_3} - stargate.

Using JB Reverse Segments on the same url...

{reverse_segment_1} = stargate {reverse_segment_2} = scifi {reverse_segment_3} = tvshows.

The extension builds the variables upon page load so it shouldn't matter how many segments there are - just count from right to left.

{reverse_segment_1} {reverse_segment_2} etc...

About

ExpressionEngine extension add-on that allows you to access url segments starting from right to left.

Resources

License

Releases

No releases published

Packages

No packages published