Move list of namespaces used for children pages to a configurable array
This commit is contained in:
parent
c1c8deef10
commit
60f3dfe08f
4 changed files with 10 additions and 1 deletions
|
@ -46,7 +46,7 @@ class action_plugin_childrenpages extends DokuWiki_Action_Plugin {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Get the list of children pages
|
// Get the list of children pages
|
||||||
$children_types = [ 'animation', 'gameplay', 'dev', 'talk' ];
|
$children_types = $this->getConf('children_list');
|
||||||
foreach ( $children_types as $child_type ) {
|
foreach ( $children_types as $child_type ) {
|
||||||
$child_label = $this->getLang("btn_$child_type");
|
$child_label = $this->getLang("btn_$child_type");
|
||||||
$this->addMenuItem($event, $child_type, $child_label);
|
$this->addMenuItem($event, $child_type, $child_label);
|
||||||
|
|
3
conf/default.php
Normal file
3
conf/default.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$conf['children_list'] = [ 'animation', 'gameplay', 'dev', 'talk' ];
|
3
conf/metadata.php
Normal file
3
conf/metadata.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$meta['children_list'] = [ 'array' ];
|
3
lang/en/settings.php
Normal file
3
lang/en/settings.php
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$lang['children_list'] = 'List of namespaces reserved for children pages';
|
Loading…
Reference in a new issue