How to make reusable for Admin Side as well as Client side?

edited December 2010 in Modules
Hi there,

I have freshly installed Fuel CMS, I really love it's admin.
I have studied some chapters from user guide. And I understood admin side functionality properly.

But one thing is not cleared, I have two application one is for client side and second is for admin side.
So now my question is that How can I make common functionality for client/admin?

I have user login page which is same as Fuel admin
save category/sub category from client side and from admin
user registration page from client side and admin side
photo gallery ...
Many more..

Above all are common modules in admin & client, please suggest me some good way so then I can re-use all module and can ignore the repeating code.

Thanks

Comments

  • edited 2:20PM
    Hello amkosys. With regards to your questions, you should be able to put any application specific code into your fuel/application directory. It uses CodeIgniter (http://codeigniter.com) as it’s framework so if you are familiar with that, it should help. Also, there is a newer 0.91 branch that uses CodeIgniter 2.0 and more importantly, has a fully working demo site that includes a couple modules (a projects and quotes module) that should be useful:
    https://github.com/daylightstudio/FUEL-CMS/tree/0.91

    In the next couple of days we will be starting a series of blog posts that should help with some of the questions you have.

    Hope this helps.
  • edited 2:20PM
    Thank you very much I got it, still one more query,
    There is a default controller is "home", I want to change it and set my "main" controller .
    So for that what change I have to do?
  • edited 2:20PM
    There actually isn't a controller of home by default (see the application/controller folder), but there is a view file of home which is the default view. You can change the name of the default view file in the fuel/modules/fuel/config/fuel.php file:
    $config['default_home_view'] = 'main'

    Essentially all requests that don't have a controller associated with them get routed to the fuel/modules/fuel/controllers/fuel_router (or page_router in 0.91 branch) instead of going to a 404 page. That controller then determines if there is a view file or a page saved in the database to serve up and if not, then serves up a 404.
  • edited 2:20PM
    Aha thanks for info.
    But instead of view, I want to load default controller from application/controller/main
    then what change need to do ? I means I have to do any settings in fuel_router? or application/config/routes.php? I am not getting that step.
  • edited 2:20PM
    I just posted a fix to allow you to use a controller for the homepage. So now you will see a separate route for the 404_override (to match the 0.91 branch) and one for the default_controller (as opposed to just the default_controller). You should just be able to change the $config['default_controller']='main' in the routes file now
  • edited 2:20PM
    Now, it's working perfectly what I needed...

    Fantastic Job !!!
Sign In or Register to comment.