How to create settings page

edited January 2014 in News & Announcements
Hi, I want to create a theme option like settings page, So client can customize their site name, logo and other details. Currently the default settings page empty. sitename.com/fuel/settings

Is there any way to customize it ?

Comments

  • edited 9:22AM
    You could add the following to your MY_fuel.php file:
    $config['settings']['site_name'] = array(); $config['settings']['logo'] = array('type' => 'asset');

    Note that "site_name" will overwrite the value of the MY_fuel.php value (at the top of the file) since settings are also a way to expose certain configuration values to the CMS. More can be found here:
    http://docs.getfuelcms.com/general/configs-settings
  • edited 9:22AM
    Thanks
  • edited 9:22AM
    Is there any way to add fieldset in settings page, for example
    'fields' => array( 'slider_tab' => array('type'=>'fieldset', 'label'=>'Slider', 'class'=>'tab'), 'slider' => array('display_label' => FALSE, 'add_extra' => FALSE, 'dblclick' => 'accordian', 'repeatable' => TRUE, 'style' => 'width: 900px;', 'type' => 'template', 'label' => 'Page sections', 'title_field' => 'title','fields' => array( 'Image' => array('type' => 'asset',), ), ))
  • edited 9:22AM
    Try adding this to MY_fuel (along with your other settings):
    $config['settings']['Slider'] = array('type'=>'fieldset', 'label'=>'Slider', 'class'=>'tab'); $config['settings']['site_name'] = array(); $config['settings']['logo'] = array('type' => 'asset');
  • edited 9:22AM
    But it cannot add multiple fields, like in the layouts
  • edited January 2014
    Did you try something like this:
    $config['settings'] = array(); $config['settings']['slider_tab'] = array('type'=>'fieldset', 'label'=>'Slider', 'class'=>'tab'); $config['settings']['slider'] = array( 'type' => 'template', 'display_label' => FALSE, 'add_extra' => FALSE, 'dblclick' => 'accordian', 'repeatable' => TRUE, 'style' => 'width: 900px;', 'label' => 'Page sections', 'title_field' => 'title', 'fields' => array( 'Image' => array('type' => 'asset',), ));
Sign In or Register to comment.