Hi, I am used to working with CI, so I was looking for a good CMS to build my apps with Codeigniter benefits.
The tutorial/documentation for the simple module is working well but I can't figure out how to create a module with an own controller and access it via url.
Can somebody please explain or provide an empty advanced module to use?
Comments
http://www.getfuelcms.com/user_guide/modules/advanced
Basically, all you really need to do is create a new folder under the fuel/modules folder that has your controllers, helpers, libraries, views, etc folders and have a controller be the same name as your folder so you can access it at:
localhost/{my_module}
You then can add routes, constants and configs as you need.
The v1.0 beta version provides a simpler way for you to create them by using the command line. Below is an example that would generate an "examples" module at fuel/modules/examples:
php index.php fuel/generate/advanced/ examples
More can be found in the 1.0 user guide. 1.0 doesn't include the user guide module by default (which is an advance module and can be looked at as an example), but you can check it out and install it at "fuel/modules/user_guide" and it will show up within the CMS on the left menu. More information is on the 1.0 installation page.
https://github.com/daylightstudio/FUEL-CMS/tree/1.0
https://github.com/daylightstudio/FUEL-CMS-User-Guide-Module
Do you recommend using 1.0 ? I have 0.93 now.
I like the approach and consider using it for our clients.
http://www.apache.org/licenses/LICENSE-2.0
Now I try to do the following things:
I want to create a new advanced module and have all files for it located in my folder inside /fuel/modules/. I want my controller,config, layouts and views to be there.
I've figured out how to make the config and controllers. (By the way: 'module_uri' doesn't want to work)
So how do you set the working/current directory for views and layouts inside the controller index method?
public $view_location = 'my_module';
// explicitly pulls from module #1 $this->load->module_view('my_module', 'my_view, $vars); // explicitly pulls from module #2 $this->load->view( 'my_module/my_view, $vars); // auto detects if you are using a controller from the same module $this->load->view( 'my_view, $vars);
Do you want me to make some kind of tutorial for it?