]> _ Git - cubist_cms-front.git/commitdiff
#2896
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 16 Jul 2019 16:43:39 +0000 (18:43 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 16 Jul 2019 16:43:39 +0000 (18:43 +0200)
resources/views/head/meta.blade.php
resources/views/head/twittercard.blade.php

index 0bf595d0ee312e5c2db33571fa634ffb0a7f4b6e..9d711fd5124b72c37ce86c64dc93557334eef910 100644 (file)
@@ -1,8 +1,19 @@
-<title>{{$page->meta_title}}</title>
+@php
+    if(isset($page)){
+        $title=$meta_title??$page->meta_title ?? $page->title.' - '.$global->meta_title;
+        $description=$meta_description ?? $page->meta_description ?? $global->meta_description;
+        $robots=$meta_robots??$page->robots=='1';
+    }else{
+        $title=$meta_description ?? $global->meta_title;
+        $description=$meta_description ??  $global->meta_description;
+        $robots=$meta_robots??true;
+    }
+@endphp
+<title>{{$title}}</title>
 <meta http-equiv="x-ua-compatible" content="ie=edge">
 <meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=, shrink-to-fit=no">
-<meta name="description" content="{{$page->meta_description}}">
-<meta name="robots" content="{{$page->robots=='1'?'index,follow':'noindex,nofollow'}}">
+<meta name="viewport" content="width=device-width,initial-scale=1.0,shrink-to-fit=no">
+<meta name="description" content="{{$description}}">
+<meta name="robots" content="{{$robots?'index,follow':'noindex,nofollow'}}">
 @stack('head.meta')
 <meta name="csrf-token" content="{{ csrf_token() }}">
\ No newline at end of file
index a077f0274d32bed5185d0bdb5b2b8eef2ccc9256..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,7 +0,0 @@
-<?php
-/**
- * Created by IntelliJ IDEA.
- * User: Vincent
- * Date: 25/02/2019
- * Time: 17:09
- */
\ No newline at end of file