Merge 4ad6539ec5
into 014a4df61f
This commit is contained in:
commit
6c7ed4c431
1 changed files with 9 additions and 4 deletions
13
lib/pico.php
13
lib/pico.php
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue