Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Cerbalus-aravensis-spider-photo-3 Task

Get original Joomla URL from a SEF one. I.e. I want to know which is the real joomla URL, while the SEF one is http://sandbox2.com.us/index.php/weblinks-component

This may be needed while developing or making modifications in Joomla extension to use the real internal joomla link.

Solution for Joomla 3

The code below alswo works in most cases, but at least once I've met a strange behaviour - url parts were messed up with some Google Analytics variable. So I gave up using it

Result in $url: index.php?Itemid=229&option=com_contact&view=contact&id=1

Old solution for Joomla 1.5, doesn't work with Joomla 3

         // Here I "unparse" the Joomla SEF url to get the internal joomla URL
            JURI::current();// It's very strange, but without this line at least Joomla 3 fails to fulfill the task
            $router =& JSite::getRouter();// get router
            $query = $router->parse(JURI::getInstance()); // Get the real joomla query as an array - parse current joomla link
            $url = 'index.php?'.JURI::getInstance()->buildQuery($query);

Thanks to Gruber

Comments   

Guest
+2 # Guest 2013-02-28 00:02
Thank you!!! I've been searching for the past hour for that.

Please register to post comments.

Found a typo? Please select it and press Ctrl + Enter.
FaLang translation system by Faboba
ОУН-УПА: легенда спротиву Українська Дивізія «Галичина» Зиновій Книш: спогади й матеріали до діяння УВО і ОУН Реаніматор електронних текстів Забуттю не підлягає 1917-1991

See a typo?

Select the text block and press

CTRL+Enter

Comments

  • NotificationAry - get emails on Joomla content is submitted, added or changed

    gruz gruz 24.05.2019 16:11
    No, it's not possible that way. Create a joomla user with name, surname etc. If you don't want such a ...

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 24.05.2019 14:27
    Hello Gruz, is it somehow possible to configure additional mailadresses like this ...

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 24.05.2019 09:28
    Found the issue When I set one of these parameters to "NO", the button disappears.https://i.ibb.co/F4zdJ9H/notification-A ...

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    gruz gruz 22.05.2019 12:02
    http://gruz.ml/images/x/2019_05_22_12_00_08_lm.png

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 22.05.2019 11:35
    How can I activate this? It istn't shown on my Joomla! installation (3.9.6) ...

    Read more...