Tip: Add a {last_segment} global variable
EE Insider guest contributor and web developer Erik Reagan posted another useful ExpressionEngine tip:
Sometimes it is quite handy to pull in the last segment of a URI. EE makes it easy to grab the first segment by using {segment_1} but there is no {last_segment}. With a little help from PHP and path.php we can change that.
Erik includes the code you need as well as a couple of links to some last_segment add-ons. Read the whole EE Insider Tip: Add a {last_segment} global variable
If you want to add your own tips and share you expertise and knowledge with the community, create an EE Insider account and add your own tips.
Share on Twitter
Erik Reagan — 04:56 on 06.30.2010
Thanks Ryan.
It’s also turned into a Feature Request over in the official FR Forum on ExpressionEngine.com. Anyone who might like to see this as a native tag please head over that way: http://expressionengine.com/forums/viewthread/159404/