Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Post limit option
givanzebace57cf3b0
diff --git a/app/component/categories/pages.php b/app/component/categories/pages.phpindex bb7a9ec..4efd8e6 100755--- a/app/component/categories/pages.php+++ b/app/component/categories/pages.php@@ -30,13 +30,13 @@ class Pages extends ComponentBase {public static $defaultOptions = ['start' => 0,'limit' => 7,+ 'posts_start' => 0,+ 'posts_limit' => NULL,'site_id' => NULL,'order' => ['url', 'price asc'],'taxonomy_item_id' => NULL,'page' => 1,- 'parents_only' => false,- 'parents_children_only' => false,- 'parents_without_children' => false,+ 'parent_id' => false,];function results() {@@ -57,6 +57,10 @@ class Pages extends ComponentBase {$category['post'] = json_decode($category['post'], true);if (is_array($category['post'])) {+ if (isset($this->options['posts_limit'])) {+ $category['post'] = array_slice($category['post'], 0 , $this->options['posts_limit']);+ }+$category['posts_count'] = count($category['post']);}}