Skip to content
Advertisement

Tag: render

How to use CI4 parser service to render view from module

I’m trying to load views from module folder, since CI always look for views in App/View folder, how this can be overwritten to give complete path from ROOTPATH instead of APPPATH/Views Error CodeIgniterViewExceptionsViewException Invalid file: {path/to/project}/app/Config/../Views/modules/PluginName/Views/index.php Answer You are using a path relative to the default Views path. You could either: 1. Edit the line below in your Config/Path.php file

Twig accessing protected/private model variables

I have a problem with Twig, (in fact this is not really a problem but it’s disturbing to me) I have a Post model class in php and i have some protected variables (I also tried with private). To acces them I have a public function in php getMyVariable. If in my controller I try to echo the protected variable

Advertisement