Skip to content

EE2 Extension that adds some Global Variables about the current page.

License

Notifications You must be signed in to change notification settings

green-egg-media/Current

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Current (ExpressionEngine 2 Extension)

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

Installation

Create a folder inside your third_party directory and name it ‘current’. You can then either clone this repo into that directory, add this repo as a git submodule, or manually place the ext.current.php file in that 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 http://www.example.com/sounds/windchimes, it would return ‘windchimes’.

{uri_string}

The current URI string. Ex: For http://www.example.com/sounds/windchimes, it would return ‘sounds/windchimes’

{tracker_1}, {tracker_2}, {tracker_3}, {tracker_4}, {tracker_5}, {tracker_6}

The uri_strings of the pages in EE’s tracker array. For example, {tracker_1} is the uri_string of the current page, {tracker_2} would give you the previously visited page, {tracker_3} would give you the page before that, etc.

About

EE2 Extension that adds some Global Variables about the current page.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages