Vheissu / Ci-Smarty

Smarty templating engine integration for Codeigniter 3.0+ with inbuilt theming and asset management.
http://ilikekillnerds.com
179 stars 43 forks source link

using with HMVC #13

Closed SNProject closed 12 years ago

SNProject commented 12 years ago

Hi, Thanks for creating the library ! How can I use the plugin with hmvc ?

I want to use the views in the modules..

Vheissu commented 12 years ago

To use this library with HMVC and loading views from within modules you'll have to somehow make the library aware of the paths by perhaps getting the current module being used. I'll look into this shortly if you can't find a solution.

gbaldera commented 12 years ago

inheritance is not working with HMVC!

Vheissu commented 12 years ago

I'll look into this, I'm planning on making the library a bit more modern in the next few days.

gbaldera commented 12 years ago

Great!

awalls commented 12 years ago

Just wondering if there was any update on the HMVC side of things. About to start a new project that will require HMVC and would love to use this.

Vheissu commented 12 years ago

Hey mate, I'll take a look tonight. It shouldn't be that hard to make it work with HMVC, I just have been so busy with work that I've been neglecting my Codeigniter projects like this one. Phil Sturgeon's template library supports Modular Extensions HMVC for loading views, so I am thinking I might take a look and see how he does it to incorporate it into this CI library. So if on the rare chance I don't, this might help.

Vheissu commented 12 years ago

awalls, I just checked the code and it appears I implemented some code sometime ago that allows views to be loaded from modules. If you check MY_Parser you should see the _module code which is checking if there is a module.

awalls commented 12 years ago

Thanks I'll have a look at that.

Vheissu commented 12 years ago

Hey Awalls,

I've made a whole heap of improvements for supporting HMVC. Firstly it checks in your modules/modulename/views directory for a requested view if you're in a module and if it can't find it, it will look in your application/views directory instead. Works quite well! happy Smartying.