Fix page saving in expert mode (/ != /home)

This commit is contained in:
Matias Griese
2014-09-26 14:10:32 +03:00
parent c501097a78
commit 0017d05493
2 changed files with 3 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ use Grav\Common\Uri;
use Grav\Common\Page\Pages;
use Grav\Common\Page\Page;
use Grav\Common\Data;
use Symfony\Component\Yaml\Yaml;
class Admin
{
@@ -398,8 +399,8 @@ 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']]);
$page->frontmatter(Yaml::dump((array) $page->header()));
} else {
// Find out the type by looking at the parent.
$type = $parent->child_type() ? $parent->child_type() : $parent->blueprints()->get('child_type', 'default');