Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

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.

Posted on Jun 30, 2010 by Ryan Irelan

Filed Under: Development Tools

Erik Reagan04: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/