scoumbourdis / codeigniter-simplicity

Codeigniter Simplicity
http://www.grocerycrud.com/codeigniter-simplicity
Other
86 stars 73 forks source link

Implementation with HMVC of wiredesignz #2

Closed giovkanata closed 11 years ago

giovkanata commented 11 years ago

I'm new on CI and while copying of simplicity files I can't understand if I have to overwrite the your MY_Loader file over the HMVC MY_Loader and/or if I have to do other modifications on the other files (I have not found anything either on EllisLab forum). Thanks in advance for all the help you'll can give me... (and apologize for my bad english)

scoumbourdis commented 11 years ago

Hello there, If you are using HMVC you just need to add the following lines:

/* load the MX_Loader class */
require APPPATH."third_party/MX/Loader.php";

class MY_Loader extends MX_Loader {
...

An example of how the MY_Loader file with the latest code at the moment is this: https://gist.github.com/scoumbourdis/6405401

giovkanata commented 11 years ago

Thank You very much indeed! (I had also thought about this but I was not sure it was right)

2013/9/1 John Skoumbourdis notifications@github.com

Hello there, If you are using HMVC you just need to add the following lines:

/* load the MX_Loader class */ require APPPATH."third_party/MX/Loader.php";

class MY_Loader extends MX_Loader { ...

An example of how the MY_Loader file with the latest code at the moment is this: https://gist.github.com/scoumbourdis/6405401

— Reply to this email directly or view it on GitHubhttps://github.com/scoumbourdis/codeigniter-simplicity/issues/2#issuecomment-23627704 .

hunguyenv commented 10 years ago

I downloaded the latest version and implemented into code successful. But css and javascript does not show up $this->load->css('bootstraps.css'); but $css display emty array. Could you please check this

scoumbourdis commented 10 years ago

That's really weird! I just checked it and it seems that everything is working as expected. Are you using it with the HMVC? Please make sure that the $css is not loaded at the view, but at the template. So for example if you have a $this->load->view('your_view'); you can't use the $css variable in this view. You have to use the $css variable in the template file. To set a template file you can simply doing it with this line of code $this->output->set_template('default'); This is at application->views->themes->default.php

hunguyenv commented 10 years ago

I've just look back my code and found out that it works with class that extends CI_Controller but MyClass extend MX_Controller is not.