Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Get the current URL

Quote Reply
Get the current URL
Hi,

I need get the current page's url for to insert in category template.

I tested:

1.- <%g%>

2.- <%Plugins::ULTRAGlobals::Get_Current_URL()%>

3.- and two 'Globals':

3.1.-
sub {
return $CFG->{build_root_url} .$ENV{REQUEST_URI};
}

3.2.-
sub {
use GT::CGI;
my $in = new GT::CGI;
my $url = $in->url(absolute => 1);
return $url;
}

All works fine in dynamic pages but don't work in static pages.

For example, if the URL is: http://www.mysite/category4/subcategory8/more32.html

The results are:

1.- (D) /category4/subcategory8/more32.html
(S) Unknown Tag: 'g'

2.- (D) http://www.mysite/category4/subcategory8/more32.html
(S) http://www.mysite

3.1.-(D) http://www.mysite/category4/subcategory8/more32.html
(S) http://www.mysite

3.2.- (D) /category4/subcategory8/more32.html
(S) nph-build.cgi

How could get the current URL in static pages? Or will be a problem in my site?
Thanks in advance.

JoseML
Subject Author Views Date
Thread Get the current URL JoseML 7703 Jan 5, 2011, 2:20 AM
Thread Re: [JoseML] Get the current URL
Andy 7630 Jan 5, 2011, 3:45 AM
Thread Re: [Andy] Get the current URL
JoseML 7556 Jan 5, 2011, 3:38 PM
Thread Re: [JoseML] Get the current URL
Andy 7553 Jan 6, 2011, 12:32 AM
Thread Re: [Andy] Get the current URL
JoseML 7585 Jan 6, 2011, 3:39 AM
Thread Re: [JoseML] Get the current URL
Andy 7584 Jan 6, 2011, 5:06 AM
Thread Re: [Andy] Get the current URL
JoseML 7551 Jan 6, 2011, 4:31 PM
Thread Re: [JoseML] Get the current URL
Andy 7556 Jan 7, 2011, 12:44 AM
Thread Re: [Andy] Get the current URL
JoseML 7514 Jan 7, 2011, 3:17 AM
Thread Re: [JoseML] Get the current URL
Andy 7517 Jan 7, 2011, 4:21 AM
Post Re: [Andy] Get the current URL
JoseML 7482 Jan 7, 2011, 7:40 AM