ORIENT/themes/modern2/pages/new/group.htm

52 lines
1.3 KiB
HTML

title = "new/group/category"
url = "/new/posts/:categoryGroup/:slug?"
layout = "new/master-inside"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[blogPosts]
pageNumber = "{{ :page }}"
categoryFilter = "{{ :slug }}"
categoryGroup = "{{ :categoryGroup }}"
postsPerPage = 10
noPostsMessage = "No posts found"
sortOrder = "published_at desc"
categoryPage = "new/category"
postPage = "new/newPost"
==
<?php
function onStart(){
//$this['backendUsers'] = Backend\Models\User::all();
$this['group'] = $this->param('categoryGroup');
$this['groupName'] = RainLab\Blog\Models\CategoryGroup::where('slug', $this['group'])->first();
//dd( $this['groupName']);
}
?>
==
<!-- HEAD end ======== -->
<main class="rubric-main">
<div class="container">
<div class="rubric-inner">
<div class="trending-head">
<h2>{% if category.name != "" %}{{category.name}}{% else %} {{ groupName.name }} {% endif %}</h2>
<span></span>
</div>
<div class="rubric-items">
{% for post in blogPosts.posts %}
{% partial 'new/post_list_item' post = post %}
{% else %}
<p>No posts found</p>
{% endfor %}
</div>
{% partial 'new/pagination' items = blogPosts.posts %}
</div>
</div>
</main>