Merge branch '1.1' of https://github.com/merdiano/orient-site into 1.1
This commit is contained in:
commit
6eb3850bef
|
|
@ -31,14 +31,23 @@ class postsController extends Controller
|
|||
'category' => input('category'),
|
||||
'date' => input('date'),
|
||||
'published' => true,
|
||||
'select' => ['id','title','published_at',DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image")]
|
||||
'select' => ['id','title','slug','published_at',DB::raw("IF(featured_image<>'',concat('$path',featured_image),featured_image) as main_image")]
|
||||
]);
|
||||
|
||||
if($data){
|
||||
$data->each(function ($item, $key) {
|
||||
$item->url = $this->pageUrl('post',['id'=>$item->id,'slug'=>$item->slug]);
|
||||
});
|
||||
}
|
||||
|
||||
return $this->helpers->apiArrayResponseBuilder(200, 'success', $data);
|
||||
}
|
||||
|
||||
public function show($locale,$id){
|
||||
|
||||
$post = $this->Post::find($id,['id','content_html','author']);
|
||||
$post = $this->Post::find($id,['id','content_html','author','slug']);
|
||||
|
||||
$post->url = $this->pageUrl('post',['id'=>$post->id,'slug'=>$post->slug]);
|
||||
|
||||
if(!is_null($post)) {
|
||||
$obj = Db::table('vdomah_blogviews_views')
|
||||
|
|
|
|||
|
|
@ -66,6 +66,11 @@ class CmsPage extends ComponentBase
|
|||
|
||||
} else { //todo els if has category component
|
||||
$this->hasBlog = $this->page["hasBlog"] = true;
|
||||
|
||||
if($this->page->page->hasComponent("blogPosts")){
|
||||
$this->seo_title = $this->page["seo_title"] = empty($this->page->meta_title) ? $this->page->title : $this->page->meta_title;
|
||||
dd($this->page->page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ $(".swiper-wrapper").slick({
|
|||
slidesToScroll: 1,
|
||||
arrows: true,
|
||||
infinite: true,
|
||||
|
||||
autoplay: true,
|
||||
speed: 500,
|
||||
prevArrow: $(".p3"),
|
||||
nextArrow: $(".n3"),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue