Hi, I'm trying to figure out how to get the complete url along with the query string. Basically it's for a Block which I want to show at:

http://example.com/newView

But not when using the pager like:

http://uicweb.net/newView?page=2

Or when doing a search like:

http://uicweb.net/newView?title=a

I know how to get the value for any of the variables (eg. $_GET['page']) -- What I'm trying to figure out is how to test to see if 'page' or 'title' is part of the url.

Thanks for any help.

Comments

leoklein’s picture

Bingo (for the query string):

$uri = explode('/', $_SERVER['REQUEST_URI']);