Mazatec
Mazatec

Reputation: 11649

How do I design plugins to work with codeigniter?

So. I'm designing a CMS which is built upon the wonderful Codeigniter framework. The core of the CMS contains:

I'd like users to be able to extend the system with plugins which they can design. Ideally these would be self contained in a folder with the plugin name eg 'coolplugin'

which would be stored in a folder I create called plugins/. So this 'coolplugin'folder will contain (I'm imagining):

But this now does not work with codeigniter as the system expects controllers to be in the Controllers folder, Views to be in the Views folder etc.

How do I manage this process? Can anyone offer advice?

Upvotes: 2

Views: 713

Answers (1)

tpae
tpae

Reputation: 6346

Interesting idea and concept. I would use Hierarchical Model View Controller(HMVC) pattern to do the job. HMVC allows "modules" to be created, and still have the CodeIgniter structure going.

Here's an excellent tutorial from Nettuts: HMVC: an Introduction and Application

Good luck! :)

Upvotes: 1

Related Questions