简体   繁体   中英

Kohana 3 How to render module inside application

How to integrate module inside application? I have modules having two controllers and two respective views inside module. Now I want to integrate this module inside my application, so that views and actions can be handled by this module only.

Note that your Application, modules and System files may intersect. Use this picture to understand Kohana cascading filesystem :

替代文字

So, if both application and your module have a views/welcome.php, application one will be found. When two modules have files with the same path, Kohana will select module with highest position in Kohana::modules() list.

Once you have created the module enable it in the application bootstrap.php then you should be able to visit [your-website]/modualController/action you might need to look at routes.

This is a great resource for modules and routing, and everything else Kohana http://kerkness.ca/wiki/doku.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM