Page 1 of 1

[SOLVED] Current page URL?

Posted: Sat May 07, 2011 3:40 pm
by admsh
sorry if this has been asked before 1000+ times, i can't seem to find an answer by searching.

how do i print the current page URL on my page? i'm creating social media links and need the current page URL as part of the code...

Re: Current page URL?

Posted: Sat May 07, 2011 3:47 pm
by M@rtijn
As far as I know there's no way to get the full url.
Read CG's post below ;)

But, what you can try is combining {root_url} with {$page_alias}, like this:
{root_url}/{$page_alias}
Not sure if this keeps working on pages created by modules.
(for example Products)

Hope this helps

Re: Current page URL?

Posted: Sat May 07, 2011 3:48 pm
by calguy1000
The CGExtensions module has a plugin for this. If you have a recent version of CGExtensions installed it's something like
{get_current_url}

The module help specifies how to use it.

Re: Current page URL?

Posted: Sat May 07, 2011 10:24 pm
by admsh
THANK YOU!!!
works like a charm.