- w którym miejscu sprawdzić czy user jest zalogowany
- jak przejść do controllera <login> redirect czy jakoś inaczej to się robi
Kod
class Controller_Website extends Controller_Template {
public $template = 'template';
public function before()
{
parent::before();
$this->template->links = array
(
'Home' => 'home',
'About' => 'about',
'Products' => 'products',
'Contact' => 'contact'
);
$this->template->styles = array();
$this->template->scripts = array();
}
public function after()
{
if ($this->auto_render)
{
$styles = array(
'media/css/screen.css' => 'screen, projection',
'media/css/print.css' => 'print',
'media/css/style.css' => 'screen',
);
$scripts = array(
'media/scripts/jquery-1.3.2.min.js'
);
$this->template->styles = array_merge( $this->template->styles, $styles );
$this->template->scripts = array_merge( $this->template->scripts, $scripts );
}
parent::after();
}
}
public $template = 'template';
public function before()
{
parent::before();
$this->template->links = array
(
'Home' => 'home',
'About' => 'about',
'Products' => 'products',
'Contact' => 'contact'
);
$this->template->styles = array();
$this->template->scripts = array();
}
public function after()
{
if ($this->auto_render)
{
$styles = array(
'media/css/screen.css' => 'screen, projection',
'media/css/print.css' => 'print',
'media/css/style.css' => 'screen',
);
$scripts = array(
'media/scripts/jquery-1.3.2.min.js'
);
$this->template->styles = array_merge( $this->template->styles, $styles );
$this->template->scripts = array_merge( $this->template->scripts, $scripts );
}
parent::after();
}
}