diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php index a2b1b3309..8098ecbda 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/postsController.php @@ -36,11 +36,11 @@ class postsController extends Controller 'published' => true, 'select' => ['id','title','slug','published_at', 'more_photo','afisha_phone', 'afisha_address', 'afisha_phone_new', DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image")] ]; - + if(request()->has('featured')){ - $filter['featured'] = true; + $filter['featured'] = true; } - + $data = $this->Post::with(['categories:id,name'])->listFrontEnd($filter); if($data){ @@ -59,7 +59,7 @@ class postsController extends Controller if(!is_null($post)) { - $post->url = $this->pageUrl('post',['id'=>$post->id,'slug'=>$post->slug]); + $post->url = $this->pageUrl('new/newPost',['id'=>$post->id,'slug'=>$post->slug]); $obj = Db::table('vdomah_blogviews_views') ->where('post_id', $post->getKey()); diff --git a/plugins/rainlab/blog/models/Post.php b/plugins/rainlab/blog/models/Post.php index debfd97ba..2c9cd4a2d 100644 --- a/plugins/rainlab/blog/models/Post.php +++ b/plugins/rainlab/blog/models/Post.php @@ -494,7 +494,6 @@ class Post extends Model if ($typePost !== null) { $typePost = is_array($typePost) ? $typePost : [$typePost]; - $query->whereIn('type_post', $typePost); } diff --git a/themes/modern2/layouts/new/master-inside.htm b/themes/modern2/layouts/new/master-inside.htm index 953ffa481..0d2bfa110 100644 --- a/themes/modern2/layouts/new/master-inside.htm +++ b/themes/modern2/layouts/new/master-inside.htm @@ -119,7 +119,7 @@ default = 0 - + {% framework extras %} {% scripts %}