01-29-2016, 01:48 AM
(This post was last modified: 01-29-2016, 01:49 AM by wolfgang1983.)
I have enabled hooks.
And I use a pre_controller
When the maintenance config item is true it should over ride the current view and display maintenance view. But does not still displays the home controller view.
I have autoloaded my setting.php config file
Then when is false should disable it.
And I use a pre_controller
PHP Code:
$hook['pre_controller'] = array(
'class' => 'Maintenance',
'function' => 'index',
'filename' => 'Maintenance.php',
'filepath' => 'controllers/common/',
);
PHP Code:
<?php
class Maintenance extends CI_Controller {
public function index() {
if ($this->config->item('maintenance') == TRUE) {
$this->load->view('theme/default/template/common/maintenance_view');
}
}
}
When the maintenance config item is true it should over ride the current view and display maintenance view. But does not still displays the home controller view.
I have autoloaded my setting.php config file
PHP Code:
<?php
$config['maintenance'] = TRUE;
Then when is false should disable it.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!