From bc1a9b31faa54a4565e04ee7159dfe19da52c700 Mon Sep 17 00:00:00 2001 From: Gert Date: Wed, 3 Jun 2015 16:21:49 +0200 Subject: [PATCH] add @config directive to get config values from blueprints --- system/blueprints/pages/default.yaml | 1 + system/src/Grav/Common/Data/Blueprint.php | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/system/blueprints/pages/default.yaml b/system/blueprints/pages/default.yaml index 0b9cd8350..e907e80c6 100644 --- a/system/blueprints/pages/default.yaml +++ b/system/blueprints/pages/default.yaml @@ -33,6 +33,7 @@ form: type: checkboxes label: Process toggleable: true + @config-default: system.pages.process default: markdown: true twig: false diff --git a/system/src/Grav/Common/Data/Blueprint.php b/system/src/Grav/Common/Data/Blueprint.php index 16569231b..bed1cffd8 100644 --- a/system/src/Grav/Common/Data/Blueprint.php +++ b/system/src/Grav/Common/Data/Blueprint.php @@ -1,6 +1,7 @@ get($value, $default); + + if (!is_null($config)) { + $field[$property] = $config; + } + } } // Initialize predefined validation rule.