From 1b56a75cdfd0952a412acde857d57ad6da34674e Mon Sep 17 00:00:00 2001 From: alexonweb Date: Wed, 9 Nov 2016 00:56:41 +0300 Subject: [PATCH] Update plugin.php --- bl-plugins/pages/plugin.php | 41 +++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/bl-plugins/pages/plugin.php b/bl-plugins/pages/plugin.php index 16b84896..52ffc086 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, + 'childrens'=>1, 'label'=>'Pages' ); } @@ -24,6 +25,12 @@ class pluginPages extends Plugin { $html .= 'getDbField('homeLink')?'checked':'').'>'; $html .= ''; $html .= ''; + + $html .= '
'; + $html .= ''; + $html .= 'getDbField('childrens')?'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('childrens')) { - // Print children - $html .= ''; - } + } $html .= '
  • '; } @@ -92,4 +103,4 @@ class pluginPages extends Plugin { return $html; } -} \ No newline at end of file +}