Skip to content

Instantly share code, notes, and snippets.

@twosixcode
Created January 28, 2012 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twosixcode/1694931 to your computer and use it in GitHub Desktop.
Save twosixcode/1694931 to your computer and use it in GitHub Desktop.
Global variables for current uri and current url in ExpressionEngine
// add to index.php
// current_url and current_uri global variables
$assign_to_config['global_vars'] = array(
'current_url'=>'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
'current_uri'=>$_SERVER['REQUEST_URI']
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment