Skip to content

Commit a33358a

Browse files
committed
Add default navigation option to module blueprints
1 parent fafd29a commit a33358a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/functions.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ function createModuleRegistry() {
1818
'listed' => true,
1919
];
2020
}
21+
if(!array_key_exists('navigation', $blueprintArray)) {
22+
$blueprintArray['navigation'] = [
23+
'status' => 'all',
24+
'template' => 'all',
25+
];
26+
}
2127
$registry['blueprints']['pages/module.'. $folder] = $blueprintArray;
2228
$registry['templates']['module.'. $folder] = $template;
2329
$registry['pageModels']['module.'. $folder] = option('medienbaecker.modules.model', 'ModulePage');
@@ -42,6 +48,12 @@ function createModuleRegistry() {
4248
'listed' => true,
4349
];
4450
}
51+
if(!array_key_exists('navigation', $blueprintArray)) {
52+
$blueprintArray['navigation'] = [
53+
'status' => 'all',
54+
'template' => 'all',
55+
];
56+
}
4557
if(!array_key_exists('pages/'. $moduleBlueprint, $registry['blueprints'])) {
4658
$registry['blueprints']['pages/'. $moduleBlueprint] = $blueprintArray;
4759
}

0 commit comments

Comments
 (0)