mirror of
https://github.com/getgrav/grav.git
synced 2026-02-15 11:07:57 +01:00
Fixed saving page in expert mode [#3174]
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
* Fixed `bin/gpm uninstall` script not working because of bad typehint [#3172](https://github.com/getgrav/grav/issues/3172)
|
||||
* Fixed `login: visibility_requires_access` not working in pages [#3176](https://github.com/getgrav/grav/issues/3176)
|
||||
* Fixed cannot change image format [#3173](https://github.com/getgrav/grav/issues/3173)
|
||||
* Fixed saving page in expert mode [#3174](https://github.com/getgrav/grav/issues/3174)
|
||||
* Fixed exception in `$flexPage->frontmatter()` method when setting value
|
||||
|
||||
# v1.7.3
|
||||
## 01/21/2021
|
||||
|
||||
@@ -396,7 +396,7 @@ class FlexPageObject extends FlexObject implements PageInterface, FlexTranslateI
|
||||
unset($elements['content']);
|
||||
}
|
||||
|
||||
// RAW frontmatter support.
|
||||
// TODO: Remove: RAW frontmatter support has been moved to Flex-Objects v1.0.2 controller.
|
||||
if (isset($elements['frontmatter'])) {
|
||||
$formatter = new YamlFormatter();
|
||||
try {
|
||||
|
||||
@@ -92,8 +92,11 @@ trait PageLegacyTrait
|
||||
public function frontmatter($var = null): string
|
||||
{
|
||||
if (null !== $var) {
|
||||
// TODO:
|
||||
throw new RuntimeException(__METHOD__ . '(string): Not Implemented');
|
||||
$formatter = new YamlFormatter();
|
||||
$this->setProperty('frontmatter', $var);
|
||||
$this->setProperty('header', $formatter->decode($var));
|
||||
|
||||
return $var;
|
||||
}
|
||||
|
||||
$storage = $this->getFlexDirectory()->getStorage();
|
||||
|
||||
Reference in New Issue
Block a user