Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Current URL

Quote Reply
Current URL
His there a way to make a plug that return the Current URL?
Quote Reply
Re: [nir] Current URL In reply to
Hi nir,

I'm using this global.

<%return_url%>

Code:
sub {
# ----------------------------------------
# Get current url
return $CFG->{build_root_url} . $ENV{REQUEST_URI};
}

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins
Quote Reply
Re: [eupos] Current URL In reply to
thanksWink
Quote Reply
Re: [nir] Current URL In reply to
This used as global always gives me back

sub { () };

but not a value. How I get an string out of this?
Thanks a lot for your help,
Christian

Quote Reply
Re: [cwschroeder] Current URL In reply to
Are you gettting that value in a GT::Template::dymp? If so, thats why. Any "functions" are shown as "sub { () } " in a dump. To see the proper value, you need to do :

Foo: <%function_name%>

..and it should print out right :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!