Jb Last Segment

Developer

Joel Bradbury

3rd Party (Free)

451 downloads (last 90 days)

Download v1.0.3

EE Version Support

  • ExpressionEngine 1.x

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

We all love clean urls and most of the time the most important part of the url is the last segment. For example a url of http://foo/bar/10/01/url_title has lots of data in it, but to get the actual entry url, we care most about the url_title part. It can be a pain to keep track of where in the segment_1, segment_2, segment_3.., that will be, especially if there are mulitple paths to the same resource.

Rather than tracking exactly how the url segments are built up throughout the site it would be nice to be able to consistently get the last part of the url. The last segment. And that’s exactly what this extension does. So now it doesn’t matter if the url is http://foo/bar/news/10/01/url_title or http://foo/bar/url_title – the variable * returns *url_title for all cases.

Installation

  1. Download and unpack JB Last Segment (also on github)
  2. Copy extensions/ext.jb_last_segment.php to your /system/extensions directory
  3. Activate the extension via System Administration > Utilities > Extensions Manager

Usage

There’s not much to do once this extension has been installed, it adds a new variable to your global variables, and you can use that variable in your templates whereever you’d like.

If previously you had :

{ exp:weblog:entries limit='1' dynamic='off' url_title='{segment_3}' }

you can now replace that with

{ exp:weblog:entries limit='1' dynamic='off' url_title='{last_segment}' }

given that the url_title is in the last segment of the url.

Support

Support and feature requests are handled via github.

Download Jb Last Segment

EE Support Downloads Add-On Version Release Date
Not Specified Download 1.0.3 Nov 3, 2009

Jb Last Segment Links

This entry was created January 11, 2010, 7:00 am.
This entry was last updated August 15, 2011, 9:41 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!