开发者

How to design Joomla style plugin in CodeIgniter

First of all, I want to describe my project architecture:

  1. My project uses jqGrid.
  2. Controllers only define the Grid.
  3. Then Models retrieve the Data for the Grid.
  4. Models are used to Add/Edit/Delete Records.
  5. Views are used to show the page.
  6. 开发者_运维技巧

Consider, I have 10 different kinds of customers for my project. My project is a hosted solution which serves my all 10 customers from a single source. Among them, eight needs the exact same as I created. Only two are different than the common.

For example, imagine that I want to show a product list. As my project is a hosted solution I can't change the menu by which I can change the controller for the said two customers.

To solve the problem, I want to implement plugin system like Joomla.

How can I do that in CodeIgniter?

Edit

I am using CI 1.7.2.


Maybe it will help you:

There is module solution for Codeigniter HMVC module . It gives you way to divide application logic into modules with their own MVC structure (each module will have it's own model\view\controller).

After installing this module into CI you'll be able to call another module from main app's controller (or view or model) like that:

<?php echo modules::run('module/controller/method', $param, $...); ?>

So I think you can use modules functionality provided by this extension to build per customer modules structure based on customers roles.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜