title = "Blog" url = "/blog/:page?" layout = "default" is_hidden = 0 [viewBag] localeUrl[gr] = "/blog-ajax" [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, ]; } ?> == {% set size_1 = this.theme.blog_posts_size %} {% set size_2 = 12 - size_1 %}
{% if this.theme.blog_posts_style == 'style1' or this.theme.blog_posts_style == 'style2' %}
{% endif %} {% if this.theme.blog_posts_style == 'style3' %}
{% endif %} {% partial "blog/posts" %} {% if this.theme.blog_posts_style == 'style1' or this.theme.blog_posts_style == 'style2' %}
{% endif %} {% if this.theme.blog_posts_style == 'style3' %}
{% endif %} {% if this.theme.blog_posts_loadmore %} {% else %} {% partial "blog/pagination" posts = blogPosts.posts %} {% endif %} {% if this.theme.blog_post_disqus %} {% endif %}
{% if (size_1 != 12) and (this.theme.blog_posts_sidebar is not empty) %}
{% for fields in this.theme.blog_widgets %} {% if fields._group == 'blog_widgets_search' %}{% partial "blog/search" %}{% endif %} {% if fields._group == 'blog_widgets_categories' %}{% partial "blog/categories" %}{% endif %} {% if fields._group == 'blog_widgets_latest' %}{% partial "blog/latest" %}{% endif %} {% if fields._group == 'blog_widgets_subscribe' %}{% partial "blog/subscribe" %}{% endif %} {% if fields._group == 'blog_widgets_gallery' %}{% partial "blog/gallery" %}{% endif %} {% endfor %}
{% endif %}