Передача параметров в layout и вывод количества точек в заголовке окна
This commit is contained in:
parent
c6c7e3ceec
commit
271115577a
|
|
@ -72,6 +72,7 @@ abstract class Controller
|
|||
'content' => $content,
|
||||
'styles' => self::$styles,
|
||||
'scripts' => self::$scripts,
|
||||
'data' => $data,
|
||||
), true);
|
||||
|
||||
if ($return)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ class IndexController extends Controller
|
|||
|
||||
$category = new Category();
|
||||
|
||||
$res = App::$DB->query("SELECT COUNT(`id`) pointsCount FROM `points`")->fetch(PDO::FETCH_ASSOC);
|
||||
App::setConfig('title', App::getConfig('title').' ('.$res['pointsCount'].' и даже больше поводов не сидеть дома)');
|
||||
|
||||
self::render('indexTemplate.php', array(
|
||||
'categories' => $category->getAll('', 'ord'),
|
||||
));
|
||||
|
|
|
|||
Loading…
Reference in New Issue