diff --git a/bl-kernel/abstract/content.class.php b/bl-kernel/abstract/content.class.php index c0eaf294..b33bb1f8 100644 --- a/bl-kernel/abstract/content.class.php +++ b/bl-kernel/abstract/content.class.php @@ -136,6 +136,12 @@ class Content { return $this->getField('readMore'); } + // + public function category() + { + return $this->getField('category'); + } + // Returns the field key public function key() { diff --git a/bl-kernel/admin/controllers/edit-page.php b/bl-kernel/admin/controllers/edit-page.php index 594b418c..696f8c96 100644 --- a/bl-kernel/admin/controllers/edit-page.php +++ b/bl-kernel/admin/controllers/edit-page.php @@ -24,6 +24,9 @@ function editPage($args) { $dbPages->regenerateCli(); + // Re index categories + reIndexCategoriesPages(); + // Call the plugins after page created. Theme::plugins('afterPageModify'); diff --git a/bl-kernel/admin/controllers/edit-post.php b/bl-kernel/admin/controllers/edit-post.php index d4f4b9b3..b3367939 100644 --- a/bl-kernel/admin/controllers/edit-post.php +++ b/bl-kernel/admin/controllers/edit-post.php @@ -21,6 +21,9 @@ function editPost($args) // Reindex tags, this function is in 70.posts.php reIndexTagsPosts(); + // Re index categories + reIndexCategoriesPosts(); + // Call the plugins after post created. Theme::plugins('afterPostModify'); diff --git a/bl-kernel/admin/controllers/new-page.php b/bl-kernel/admin/controllers/new-page.php index 5846f975..7bf42726 100644 --- a/bl-kernel/admin/controllers/new-page.php +++ b/bl-kernel/admin/controllers/new-page.php @@ -18,6 +18,9 @@ function addPage($args) if($key) { + // Re index categories + reIndexCategoriesPages(); + // Call the plugins after page created. Theme::plugins('afterPageCreate'); diff --git a/bl-kernel/admin/themes/default/init.php b/bl-kernel/admin/themes/default/init.php index 3f244a5f..c32dca33 100644 --- a/bl-kernel/admin/themes/default/init.php +++ b/bl-kernel/admin/themes/default/init.php @@ -143,6 +143,9 @@ class HTML { $html .= ''; $html .= '