Post by coen1234 » Thu Mar 08, 2012 3:08 am

For the looks i'm styling the CSS of my pages routebased e.g. account_login.css. But i also want to do the Maintenance page. I already made the common_maintenance.css file. But when i'm testing my site isn't displaying correct. It is just showing http://www.mywebsite.com instead of http://www.mywebsite.com/index.php?rout ... aintenance. Please can somebody help me with this?
Last edited by qahar on Mon Mar 12, 2012 11:28 am, edited 1 time in total.
Reason: add solved tag

New member

Posts

Joined
Thu Mar 08, 2012 3:05 am

Post by coen1234 » Sat Mar 10, 2012 2:58 am

Solved!!!!

Code: Select all

<?php
class ControllerCommonMaintenance extends Controller {
    public function index() {
        if ($this->config->get('config_maintenance')) {
			$route = '';
			
			if (isset($this->request->get['route'])) {
				$part = explode('/', $this->request->get['route']);
				
				if (isset($part[0])) {
					$route .= $part[0];
				}			
			}
			
			// Show site if logged in as admin
			$this->load->library('user');
			
			$this->user = new User($this->registry);
	
			if (($route != 'payment') && !$this->user->isLogged()) {
				return $this->forward('common/maintenance/info');
			}						
        }
    }
		
	public function info() {
        $this->load->language('common/maintenance');
        
        $this->document->setTitle($this->language->get('heading_title'));
        $css = 'catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/common_maintenance.css';
        $this->document->addStyle($css);
        $this->data['heading_title'] = $this->language->get('heading_title');
                
        $this->document->breadcrumbs = array();

        $this->document->breadcrumbs[] = array(
            'text'      => $this->language->get('text_maintenance'),
			'href'      => $this->url->link('common/maintenance'),
            'separator' => false
        ); 
        
        $this->data['message'] = $this->language->get('text_message');
      
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/maintenance.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/common/maintenance.tpl';
        } else {
            $this->template = 'default/template/common/maintenance.tpl';
		 }
		 	
		$this->children = array(
			'common/footer',
			'common/header'
		);
		
	
		$this->response->setOutput($this->render());
    }
}
?>

New member

Posts

Joined
Thu Mar 08, 2012 3:05 am
Who is online

Users browsing this forum: No registered users and 9 guests