Jump to content

Community

How to get the current URL in FURL form


Go to solution Solved by Daniel F,

Recommended Posts

I get current URL with this:

\IPS\Request::i()->url()

sometimes it returns :

http://ips.valacoding.com/index.php?/store/product/2-the-compound-effect/

and sometimes returns :

http://ips.valacoding.com/index.php?app=core&module=system&controller=widgets&do=getBlock&blockID=app_nexus_latestProducts_tfxsn9iaq&pageApp=nexus&pageModule=store&pageController=product&pageArea=header&orientation=horizontal.....

 

Is there a specific method that always returns URL in friendly form?  [ http://ips.valacoding.com/index.php?/store/product/2-the-compound-effect/ ]
 

Link to comment
Share on other sites

  • Solution

Why would you want to get a friendly url for 

http://ips.valacoding.com/index.php?app=core&module=system&controller=widgets&do=getBlock&blockID=app_nexus_latestProducts_tfxsn9iaq&pageApp=nexus&pageModule=store&pageController=product&pageArea=header&orientation=horizontal..... 

? The page is meant to be shown in a modal and only to moderators with permissions to edit the sidebar, there's no point in having a friendly url here.

Link to comment
Share on other sites

Posted (edited)
8 minutes ago, Daniel F said:

Why would you want to get a friendly url for 



http://ips.valacoding.com/index.php?app=core&module=system&controller=widgets&do=getBlock&blockID=app_nexus_latestProducts_tfxsn9iaq&pageApp=nexus&pageModule=store&pageController=product&pageArea=header&orientation=horizontal..... 

? The page is meant to be shown in a modal and only to moderators with permissions to edit the sidebar, there's no point in having a friendly url here.

This is what is returned with this helper:

\IPS\Request::i()->url()

When I'm here

http://ips.valacoding.com/index.php?/store/product/2-the-compound-effect/


 

Edited by ReyDev
Link to comment
Share on other sites

2 hours ago, Daniel F said:

The page is meant to be shown in a modal and only to moderators with permissions to edit the sidebar, there's no point in having a friendly url here.

Thanks.
This point was very useful and I realized where the problem came from.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy