Does not find styles and scripts.

<head> <title><?= $site_name ?> | <?= $page_title ?></title> <? foreach ($styles as $file_style): ?> <?= html::style($file_style) ?> <? endforeach ?> <? foreach ($scripts as $file_script): ?> <?= html::script($file_script) ?> <? endforeach ?> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> 

 class Controller_Index extends Controller_Common { public $template = 'v_common'; // Базовый шаблон public function before() { parent::before(); $this->template->styles[] = 'media/css/style.css'; $this->template->scripts[] = 'media/js/reg.js'; $this->template->block_header = View::factory('v_header'); $this->template->block_center_left = View::factory('v_center'); $this->template->block_center_right = View::factory('v_right'); $this->template->block_footer = View::factory('v_footer'); } } 

Writes

ErrorException [ Notice ]: Undefined variable: file_style

and everything worked before.

  • Look in the view that is in the $ styles array - Demyan112rv
  • 2
    what does "earlier" mean? earlier than what? try to remember what actions preceded the fact that “everything broke” - actionless
  • Show $ styles and html class - koza4ok

0