开发者

How can I load a library in shared_addons from a shared_addons module in PyroCMS?

I'm making a module in the ./addons/shared_addons/modules/ directory. The module's called render.

From within that module I want to access a library that I've pu开发者_如何学JAVAt in the ./addons/shared_addons/libraries/ directory. The library's called pchart

If, from the module, I use $this->load->library('pchart') it fails saying that it can't find the file.

I've tried copying the pchart library file to the ./system/cms/libraries/ directory, and from there it loads fine, so the file itself is OK. It's just not looking in the right place.

By default it's looking in the module for the library but it's not there. How can I tell PyroCMS to look in the right place?

Thanks.


I went to the PyroCMS forums (http://pyrocms.com/forums/topics/view/5385) to find this out in the end:

The ./addons/shared_addons/libraries/ directory is used for sharing addons across all sites being managed by the one PyroCMS install.

In most cases there's just one site, default. In order to share an addon with the whole site there's a directory at ./addons/default/ that is the second port of call for the loader library. (second to the module itself)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜