What I want to do is creating a file like my_custom_settings.php in config directory and call the defined variable in view part.
let’s say in my_custom_settings.php:
define('TEMPLATE_DIR', 'assets/front');
and in view part direct in HTML:
<link href="<?=TEMPLATE_DIR?>/stylesheet/style.css">
or any other alternative solution??
PS: Now I am using base_url() to access the path
personally i extend the /core/helpers/url_helper.php , defaults are
site_url() , base_url(), current_url();etc … i just extended that for havingbase_static_url();so put in core/helpers/url_helper.php:
then in config.php file you just add 1 more line:
then you can call static resources using :