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};
}

rgrdz
Boris
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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates