New page: Add title to the frontmatter on expert mode

This commit is contained in:
Matias Griese
2014-09-26 13:45:22 +03:00
parent e7180d22d9
commit c501097a78
2 changed files with 1 additions and 5 deletions

View File

@@ -240,11 +240,6 @@ class AdminPlugin extends Plugin
$array = explode('/', $path, 2);
$this->template = array_shift($array);
$this->route = array_shift($array);
// Set path for new page.
if ($this->uri->param('new')) {
$this->route .= '/new';
}
}
// Initialize admin class.

View File

@@ -398,6 +398,7 @@ class Admin
// Found the type and header from the session.
$data = $this->session->{$page->route()};
$page->name($data['type'] . '.md');
$page->frontmatter('title: ' . $data['title']);
$page->header(['title' => $data['title']]);
} else {
// Find out the type by looking at the parent.