From 757fdb1a5fe93b5fe91d79fde31d1c8c0d1867a7 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 18 Jan 2023 12:21:04 +0500 Subject: [PATCH] from server 18.01 --- themes/modern2/pages/new/newPost.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/modern2/pages/new/newPost.htm b/themes/modern2/pages/new/newPost.htm index 750f454ff..b5039015e 100644 --- a/themes/modern2/pages/new/newPost.htm +++ b/themes/modern2/pages/new/newPost.htm @@ -30,8 +30,9 @@ function onStart(){ $catId = $this['featuredPosts'][0]->categories[0]->id; //dd($this['featuredPosts'][0]->categories[0]->slug); - if($this->menuItems && $postId && $currentPost && $currentPost->category_groups){ + if($this->menuItems && $postId && $currentPost && $currentPost->category_groups->count() > 0){ + $currentGroup = $currentPost->category_groups[0]->name; foreach ($this->menuItems as $menu){