title = "Пост" url = "/old/post/:id/:slug" layout = "new/master-inside" is_hidden = 0 seo_keywords = "Türkmenistan, Turkmenistan, Туркменистан, Ориент новости, Orient news, Orienttm, Turkmen habarlary, Turkmen habarlar, Turkmen news, Новости Туркменистана, Новости СНГ, Новости средней азии, Новости Центральной Азии," robot_index = "index" robot_follow = "follow" [viewBag] localeTitle[en] = "Post" [blogPost] slug = "{{ :slug }}" id = "{{ :id }}" categoryPage = 404 [views] slug = "{{ :slug }}" [SeoBlogPost] post = "post" == page->blogPost); $postId = $this->param('id'); $currentPost = RainLab\Blog\Models\Post::where('id', $postId)->with(['category_groups'])->first(); $this['featuredPosts'] = RainLab\Blog\Models\Post::with(['categories'])->where('id', $postId)->paginate(10); $catId = $this['featuredPosts'][0]->categories[0]->id; //dd($this['featuredPosts'][0]->categories[0]->slug); if($this->menuItems && $postId && $currentPost && $currentPost->category_groups->count() > 0){ $currentGroup = $currentPost->category_groups[0]->name; foreach ($this->menuItems as $menu){ //dump($menu->title); if($menu->title === $currentGroup){ $menu->isActive = true; break; } } } // dd($this['posts']); } ?> == {% put styles %} {% endput %} {% component 'SeoBlogPost' %} {% set post = blogPost.post %}

{{post.title}}

{{post.published_at|date('d.m.Y')}} | {{post.published_at|date('H:i')}} |
{% partial 'view' %}
{% if post.more_photo|length > 0 %} {% for img in post.more_photo %}
 {{post.title}}
{% endfor %} {% else %}
 {{post.title}}
{% endif %}
{{post.content|md}} {% if post.img_source %}
{{ 'Фото'|_ }}: {{ post.img_source }}
{% endif %}
{% partial 'new/social' %}
{% partial 'new/post-featured' %}
{% partial 'newHome/right-sidebar.htm' class="article-aside" %}
{% put scripts %} {% endput %}