Posted By

anagaiyahoocom on 03/10/11


Tagged

joomla


Versions (?)

Getting Page Path and Query String With JUri


 / Published in: PHP
 

Can use JUri to get the page handle

  1. //Get the page path e.g. /category/sub-category/sompage.html
  2. JUri::getInstance()->toString(array('path'));
  3.  
  4. //Get the page path with query string e.g. /category/sub-category/sompage.html?param=val&param2=val2
  5. JUri::getInstance()->toString(array('path','query'));
  6.  
  7. //Retreive just the query string
  8. JUri::getInstance()->getQuery()
  9.  
  10. or
  11.  
  12. JUri::getInstance()->toString(array('query'));

Report this snippet  

You need to login to post a comment.