Need help with making Custom Module Front-end Views (Advanced Module)
I'm kind of recreating the simple modules into an advanced module. I'm now about to make the data available in the front-end.
If I simply create a /views/categories.php file in my module's directory (/mymodule for example), I don't see it when I open URI /mymodule/categories, so I made a controller named /controllers/categories.php, and set the $view_location as 'mymodule' and now I see the contents of /views/categories.php now, but it is wrapped in the admin UI. Any clues on how to make this display with the layout and theme of the front end UI?
Or am I doing it totally wrong and there is an easy way? Like maybe a configuration I may have missed that will trigger the views on my module to show up automatically in the front-end via their front-end URLs (/mymodule/categories) without creating controllers (I assumed there's such a way because of the opt-in controllers development).
Looking forward for some help. Thanks!
Comments
http://www.getfuelcms.com/user_guide/general/creating-pages
class About extends Controller { function About() { parent::Controller(); } function contact() { // set your variables $vars = array('page_title' => 'Contact : My Website'); //... form code goes here // load the fuel_page library class and pass it the view file you want to load $this->load->module_library(FUEL_FOLDER, 'fuel_page', array('location' => 'about/contact')); $this->fuel_page->add_variables($vars); $this->fuel_page->render(); }
Thanks.