title = "Blog Category" url = "/blog/category/:slug/:page?" layout = "blog" is_hidden = 0 [viewBag] localeUrl[gr] = "/blog-category" [blogPosts] pageNumber = "{{ :page }}" categoryFilter = "{{ :slug }}" postsPerPage = 6 noPostsMessage = "No posts found" sortOrder = "published_at desc" categoryPage = "blog/blog-category" postPage = "blog/blog-post" [blogCategories] slug = "{{ :slug }}" displayEmpty = 0 categoryPage = "blog/blog-category" [searchInput blogSearchInput] useAutoComplete = 1 autoCompleteResultCount = 5 showProviderBadge = 1 searchPage = "blog/search-posts.htm" == components['blogPosts']->setProperty('pageNumber', $pageNumber); $this->components['blogPosts']->onRun(); if ($pageNumber < $this->components['blogPosts']->posts->lastPage()) { // for simplicity, we generate html, but in principle you can make a separate parcel for the button $more_link = 'Load More'; } else { // if we reached the last page, the button is no longer needed $more_link = ''; } return [ // if the @ is in front of the selector, the new content will be added to the end, rather than replacing the old '@#all-posts' => $this->components['blogPosts']->renderPartial('blog/posts'), '#load-more' => $more_link, ]; } ?> == {% if category.featured_images.count > 0 and this.theme.blog_posts_pageheader == 'category' %} {% partial "blog/categoryheader" %} {% else %} {% partial "blog/pageheader" %} {% endif %} {% set size_1 = this.theme.blog_posts_size %} {% set size_2 = 12 - size_1 %}