ZenphotoCMS Forum
function to get the current url - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: function to get the current url (/thread-9071.html)



function to get the current url - vincent3569 - 2011-09-15

hi

I had a look on documentation, but I don't have found what I am looking for.
Is there a function to get the current url ?




function to get the current url - sbillard - 2011-09-15

If you mean the URL of the page being displayed then you can get it from the $_SERVER array. It is the REQUEST_URI item in the array.




function to get the current url - vincent3569 - 2011-09-15

thanks

REQUEST_URI gives the rewrited url ?
ie : http://domaine.fr/news instead of http://domaine.fr/index.php?p=news




function to get the current url - sbillard - 2011-09-15

It gives the URL that was "submitted" by the browser. So it will be rewritten under normal circumstances.




function to get the current url - acrylian - 2011-09-16

We have also functions to get the url of the current item like getAlbumLinkURL(). For zenpage items there are also functions like getNewsURL() (see doc for the right name).