Welcome Guest, Not a member yet? Register   Sign In
errors views and helpers
#1

Hello family,
I wonder why the helpers functions do not work in error views. For example, why is it impossible to do
PHP Code:
echo site_url('css/styles'); 
in the file: application/views/errors/html/error_404.php?
Simplicity is the ultimate sophistication
Reply
#2

you need to load url helper from config/autoload.php to use this helper function.
set as below:
$autoload['helper'] = array('url');
Reply
#3

(08-23-2017, 11:14 AM)curiousteam Wrote: you need to load url helper from config/autoload.php to use this helper function.
set as below:
$autoload['helper'] = array('url');

I know how these helpers work. But my problem is that, in codeigniter errors views, it's not possible to use helpers functions. Why?
Try it yourself, you 'll see that you can't use neither codeigniter native helpers functions, nor your own functions in errors views.
Simplicity is the ultimate sophistication
Reply
#4

I know how it works. That is not my question. My question is why it is impossible to use the functions of the native helpers or helpers i created in the error views. Try to use site_url() function in the error_404 errors view and you'll see that it is not possible to use it. Try it yourself
Simplicity is the ultimate sophistication
Reply
#5

Hey,

I've checked this issue and am facing the same problem.

Example:
With the use of site_url() or base_url() I am not able to use my global CSS with the advantage of dynamic paths.

Greets,
stebo
Reply




Theme © iAndrew 2016 - Forum software by © MyBB