I am trying to grab the URL from each paged viewed on my site. Instead of pasting the same code in each file, I was hoping to put it in the template code that writes the banner for each page. I've tried many of the global variables and it only returns the URL/path of the template file. For example:
if the URL is http://domain.com/index.php
and the template file is here: http://domain.com/template.php
the result I get is http://domain.com/template.php
Is there anyway to get around this?
I was also considering just setting a $path variable in the first line of every page... but I was having a hard time passing the value to the template.php (where the variable would be used to execute a function).