diff --git a/bl-plugins/pages/languages/en_US.json b/bl-plugins/pages/languages/en_US.json index 8158fefa..389c780e 100644 --- a/bl-plugins/pages/languages/en_US.json +++ b/bl-plugins/pages/languages/en_US.json @@ -6,5 +6,6 @@ }, "home": "Home", - "show-home-link": "Show home link" -} \ No newline at end of file + "show-home-link": "Show home link", + "show-children": "Show children" +} diff --git a/bl-plugins/pages/languages/ru_RU.json b/bl-plugins/pages/languages/ru_RU.json index e67cbf4d..ab5a8045 100644 --- a/bl-plugins/pages/languages/ru_RU.json +++ b/bl-plugins/pages/languages/ru_RU.json @@ -6,5 +6,6 @@ }, "home": "Главная", - "show-home-link": "Показывать ссылку на главную" + "show-home-link": "Показывать ссылку на главную", + "show-children": "Показывать подменю" } diff --git a/bl-plugins/pages/plugin.php b/bl-plugins/pages/plugin.php index 16b84896..ca3ac36d 100644 --- a/bl-plugins/pages/plugin.php +++ b/bl-plugins/pages/plugin.php @@ -6,6 +6,7 @@ class pluginPages extends Plugin { { $this->dbFields = array( 'homeLink'=>1, + 'children'=>1, 'label'=>'Pages' ); } @@ -24,6 +25,12 @@ class pluginPages extends Plugin { $html .= 'getDbField('homeLink')?'checked':'').'>'; $html .= ''; $html .= ''; + + $html .= '
'; + $html .= ''; + $html .= 'getDbField('children')?'checked':'').'>'; + $html .= ''; + $html .= '
'; return $html; } @@ -62,25 +69,29 @@ class pluginPages extends Plugin { $html .= '
  • '; $html .= ''.$parent->title().''; - // Check if the parent has children - if(isset($pagesParents[$parent->key()])) - { - $children = $pagesParents[$parent->key()]; + // Show children elements? + if($this->getDbField('children')) { - // Print children - $html .= ''; - } + } $html .= '
  • '; } @@ -92,4 +103,4 @@ class pluginPages extends Plugin { return $html; } -} \ No newline at end of file +}