Advertisement
theitd

Get URL from Joomla SEF

Oct 20th, 2014
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2. // "unparse" the Joomla SEF url to get the internal joomla URL
  3.     JURI::current();// It's very strange, but without this line at least Joomla 3 fails to fulfill the task
  4.     $router =& JSite::getRouter();// get router
  5.     $query = $router->parse(JURI::getInstance()); // Get the real joomla query as an array - parse current joomla link
  6.     $url = 'index.php?'.JURI::getInstance()->buildQuery($query);
  7. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement