如何从CodeIgniter中的特定(共享)路径加载视图? [英] How do I load a view from a specific (shared) path in CodeIgniter?
问题描述
我为几个项目使用CodeIgniter。
我还没有想出怎么做是跨项目的共享视图。
例如,我想要这样做:
$ this-> load-> view(mysharedview);
在我的项目的application / views文件夹中不存在mysharedview.php,
任何人都知道这样做,不需要修改核心CI文件?
看来它可以做你想要的。
p>https://github.com/EllisLab / CodeIgniter / wiki / Matchbox
I'm using CodeIgniter for several projects.
What I haven't figured out how to do is have "shared" views across projects.
For example, I'd like to be able to do something like this:
$this->load->view ("mysharedview");
Where mysharedview.php does not exist in my project's application/views folder, but in a shared location that is used by all projects.
Anyone know of a way to do this that doesn't require modifying the core CI files?
Have you looked at Matchbox??
it seems that it can do what you want..
https://github.com/EllisLab/CodeIgniter/wiki/Matchbox
这篇关于如何从CodeIgniter中的特定(共享)路径加载视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!