mirror of
https://github.com/getgrav/grav.git
synced 2026-02-27 17:11:27 +01:00
Fixed flex pages using wrong type in onBlueprintCreated event [#3157]
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* Fixed `pathinfo()` twig filter in PHP7
|
||||
* Fixed the first visible child page getting ordering number `999999.` [#3365](https://github.com/getgrav/grav/issues/3365)
|
||||
* Fixed flex pages search using only folder name [#3316](https://github.com/getgrav/grav/issues/3316)
|
||||
* Fixed flex pages using wrong type in `onBlueprintCreated` event [#3157](https://github.com/getgrav/grav/issues/3157)
|
||||
|
||||
# v1.7.15
|
||||
## 05/19/2021
|
||||
|
||||
@@ -502,6 +502,8 @@ class PageObject extends FlexPageObject
|
||||
if ($isNew === true && $name === '') {
|
||||
// Support onBlueprintCreated event just like in Pages::blueprints($template)
|
||||
$blueprint->set('initialized', true);
|
||||
$blueprint->setFilename($template);
|
||||
|
||||
Grav::instance()->fireEvent('onBlueprintCreated', new Event(['blueprint' => $blueprint, 'type' => $template]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user