[SOLVED] Current page URL?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
admsh
Forum Members
Forum Members
Posts: 93
Joined: Tue Aug 19, 2008 6:30 pm

[SOLVED] Current page URL?

Post 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...
Last edited by admsh on Sat May 07, 2011 10:25 pm, edited 1 time in total.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm

Re: Current page URL?

Post 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
Make your community a better place!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Current page URL?

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
admsh
Forum Members
Forum Members
Posts: 93
Joined: Tue Aug 19, 2008 6:30 pm

Re: Current page URL?

Post by admsh »

THANK YOU!!!
works like a charm.
Post Reply

Return to “Layout and Design (CSS & HTML)”