This commit is contained in:
Ahmad Samiei 2013-09-04 03:32:25 -07:00
commit 6c7ed4c431

View file

@ -98,7 +98,11 @@ class Pico {
'is_front_page' => $url ? false : true,
);
$this->run_hooks('before_render', array(&$twig_vars, &$twig));
$output = $twig->render('index.html', $twig_vars);
if (isset($meta['layout']) && ! empty($meta['layout'])) {
$output = $twig->render($meta['layout'], $twig_vars);
} else {
$output = $twig->render('index.html', $twig_vars);
}
$this->run_hooks('after_render', array(&$output));
echo $output;
}
@ -150,9 +154,10 @@ class Pico {
$headers = array(
'title' => 'Title',
'description' => 'Description',
'author' => 'Author',
'date' => 'Date',
'robots' => 'Robots'
'author' => 'Author',
'date' => 'Date',
'robots' => 'Robots',
'layout' => 'Layout'
);
// Add support for custom headers by hooking into the headers array