From 6866f943463abc50f668b433d126ea420e0f43b7 Mon Sep 17 00:00:00 2001 From: Shohrat Date: Fri, 24 Feb 2023 05:19:57 +0000 Subject: [PATCH] post settings video --- .htaccess | 4 ++++ plugins/rainlab/blog/classes/PostResource.php | 2 +- plugins/rainlab/blog/models/Post.php | 2 -- themes/hhm/meta/static-pages.yaml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 themes/hhm/meta/static-pages.yaml diff --git a/.htaccess b/.htaccess index addd1a9..ce6d788 100644 --- a/.htaccess +++ b/.htaccess @@ -6,6 +6,10 @@ RewriteEngine On + + Header set Access-Control-Allow-Origin "*" + + ## ## You may need to uncomment the following line for some hosting environments, ## if you have installed to a subdirectory, enter the name here also. diff --git a/plugins/rainlab/blog/classes/PostResource.php b/plugins/rainlab/blog/classes/PostResource.php index 5f421e2..9d7f11b 100644 --- a/plugins/rainlab/blog/classes/PostResource.php +++ b/plugins/rainlab/blog/classes/PostResource.php @@ -16,7 +16,7 @@ class PostResource extends JsonResource public function toArray($request) { $locale = $request->get('locale'); - $path = Config::get('app.cdn').Config::get('cms.storage.media.path'); + $path = Config::get('app.url').Config::get('cms.storage.media.path'); return [ 'id' => $this->id, diff --git a/plugins/rainlab/blog/models/Post.php b/plugins/rainlab/blog/models/Post.php index 2d6099a..b5a5944 100644 --- a/plugins/rainlab/blog/models/Post.php +++ b/plugins/rainlab/blog/models/Post.php @@ -121,8 +121,6 @@ class Post extends Model // dd($fields->type->value); if($fields->type->value == 'photo'){ $fields->video->hidden = true; - }else{ - $fields->featured_images->hidden = true; } } diff --git a/themes/hhm/meta/static-pages.yaml b/themes/hhm/meta/static-pages.yaml new file mode 100644 index 0000000..69beb95 --- /dev/null +++ b/themes/hhm/meta/static-pages.yaml @@ -0,0 +1 @@ +static-pages: { }