Extension

EE 1
EE 2
Current

Developer

Green Egg Media

3rd Party (Free)

Creative Commons Attribution Share Alike Download v1.1

Compatibility

Requirements

  • jQuery for the Control Panel

Tags

Creates {current_url}, {total_url_segments}, and {last_url_segment} global variables based on the current page.

Current is small extension for ExpressionEngine 2 that grabs some useful information about the current page and adds them as global variables.

Installation

Drop the ‘current’ folder inside of your third_party directory. Activate the extension through the Add-Ons → Extensions menu.

Usage

Current creates some global variables you can use to look cool.

{current_url}

The current URL of the page. Ex: http://www.example.com/shoes.

{total_url_segments}

The total number of URL segments. Ex: For http://www.example.com/bread/rye, it would be ‘2’.

{last_url_segment}

Returns the last URL segment. Ex: For For http://www.example.com/sounds/windchimes, it would return ‘windchimes’.

Download Current

EE Version Downloads Add-On Version Release Date
2.+ Download 1.1

Current Links

Hooks Used

If the add-on is an extension, and ties into ExpressionEngine's core files, it will use ExpressionEngine hooks. We are listing any hooks the add-on uses for developers to have an easier time locating other add-ons that they can reference for their own work.

  1. sessions_start

This entry was last updated April 14, 2012, 9:28 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!

2 Reviews:

Ryan Masuga 04.14.12

Ryan Masuga
Rating - {addon_rating_average}

I believe a couple of these variables are native in EE 2.4 now, but I needed {uri_string} for a complex site. I sent a pull request on Github and Adam added it (good dev response). Does what it says with little overhead.

Nico Prat 03.08.11

Rating - {addon_rating_average}

Great ! It should simply be added to the EE code base.