CodeIgniter Forums
View Parser site_url - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: View Parser site_url (/showthread.php?tid=73564)



View Parser site_url - luispastendev - 05-08-2019

Hi all!

I'm using the view parser library and I have a problem calling a plugin.

In the documentation it says that it is enough to put this fragment of code to obtain the url of the site

Code:
{+ site_url "login" +}


But when using it nothing happens is a bug? or is there something missing to configure?

Thank you!


RE: View Parser site_url - cedreek - 05-10-2019

Hi Luispastendev,

I had the same problem. After search into System\View\Plugins.php, the good syntax is {+ siteURL +} . Works for me.


RE: View Parser site_url - luispastendev - 05-10-2019

(05-10-2019, 02:47 AM)cedreek Wrote: Hi Luispastendev,

I had the same problem. After search into System\View\Plugins.php, the good syntax is {+ siteURL +} . Works for me.

hi cedreek thank you for answering!

It works that way so what is wrong is the documentation.

Another question, there is some function in View parser to put base_url I think it is a plugin that would be missing because site_url generates the path but adding /index.php, base_url could generate the absolute path to build links in our views.

I have created a custom plugin to solve this issue would be very good to be able to add it in future versions.

Grettings!