Override FUEL layouts (for admin)

edited December 2014 in Feature Requests
Just curious, is this something that's doable in the current structure? Basically, I want to change the login screen for the CMS part of the site but I don't necessarily want to go in and tweak the source code just have a file to override the current layout.

Additionally, is there a way to add to the right sidebar items that show up in a model's item view? For instance, on pages there's the restore from a previous version dropdown and the create a navigation link. I'd like to add a context type menu to the side of model so admins can navigate around a bit quicker within the admin.

Comments

  • edited 4:51PM
    For changing the login screen, you can't easily change the view but you could add your own CSS file to overwrite existing styles using an $config['xtra_css'] configuration parameter in fuel/application/config/MY_fuel.php which specifies a CSS file.

    For modifying the existing modules, there is a $config['module_overwrites'] configuration parameter you can set in the fuel/application/confg/MY_fuel_modules.php file. In your case you could set the pages module to use your own extended MY_pages_model which would overwrite the "related_items" method (the method used to create the right sidebar content):
    $config['module_overwrites']['pages'] = array('model_name' => 'my_pages_model', 'model_location' => 'app');
    Then in your fuel/application/models/ folder you could add a my_pages_model file similar to the following:
    require_once(FUEL_PATH.'models/fuel_pages_model.php'); class Fuel_pages_model extends Fuel_pages_model { function related_items() { return 'My related content goes here'; } }
    http://docs.getfuelcms.com/modules/simple#overwrites
    http://docs.getfuelcms.com/libraries/base_module_model
  • edited 4:51PM
    Great! I'll give it a shot. I sort of figured my only option would be to use CSS to override the admin styling but I know in some places we do want to change a few elements on the page so we'll have to modify the core files
Sign In or Register to comment.