I looked at EE's Addons and the closest thing I can think off is to use Modules. However, the templates that I have in mind are using EE tags.

I looked at EE's pre-installed modules and they seem to use pure PHP in their view so I am not sure if that will work since I need EE tags.

Is there a way to bundle a plugin and templates together so that I can easily transfer it to another EE installation?

1 Answer 1


You can render views from module/plugin tags fine. I've done this in the past and they work with EE tags within them, so most EE tags are available. From memory you might have issues with early global variables not being available as they're called before plugin/module tags.

So within your plugin/module, instead of returning a parsed variable array for example, you just pass your vars to the view which is located in your add-ons's /views folder.

In this case I'd have /my-addon/views/foo.php

return ee()->load->view('foo', $vars, TRUE);

Just need to set the third parameter to TRUE so the view is returned as data, as per the CI docs: http://ellislab.com/codeigniter/user-guide/general/views.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.