Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Zend Framework module view script path

Currently view scripts located in APPLICATION_PATH . '/modules/my_module/views/scripts/'. I want to place scripts in '/modules/my_module/views/' (remove scripts folder). How to achieve this?

application.ini:

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[] =
resources.view.scriptPath.default = APPLICATION_PATH "/views"
like image 681
tellnobody1 Avatar asked Dec 12 '22 10:12

tellnobody1


1 Answers

You could use the setScriptPath(APPLICATION_PATH . '/modules/my_module/views') view method to replace the script path.

You can also add your script path without overriding the previous one, using addScriptPath(APPLICATION_PATH . '/modules/my_module/views'). I use it to have organized the view scripts in different folders.

Hope that helps...

like image 186
dinopmi Avatar answered Dec 26 '22 15:12

dinopmi