This extension will add the following global variables:
* {last_segment} – last segment (will never be the pagination segment ie /P1)
* {last_segment_absolute} – absolute last segment (even pagination)
* {last_segment_id} – the id of the last segment (for example “3”)
* {last_segment_absolute_id} – the id of the absolute last segment
If you don’t want to add these global vars you can use the plugin instead:
{exp:last_segment} will return the last segment. {exp:last_segment ignore_pagination='no'} will be the same as {last_segment_absolute}
http://github.com/bjornbjorn/Last-Segment-extension—plugin
Download it here: http://github.com/bjornbjorn/Last-Segment-extension—plugin/zipball/master
// UPDATED description: 19/02/2010
SCHWEET, done that, it works well enough.
_absolute returns the same thing as the normal tag, it ignores the /P1/ bit, which is great.
Thank you. This would be even more epic, if you could echo a “last_segment_id”, as in the sequential number of the segment.
so: site.com/se/gm/en/ts/
{last_segment} says: ts {last_segment_id) says: 4
http://ee.bybjorn.com/last_segment this is where the documentation link goes to (404).
Make a sexeh homepage for this beautiful plugin!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.