]> _ Git - cubist_cms-front.git/commitdiff
wip #3520 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 2 Apr 2020 16:02:53 +0000 (18:02 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 2 Apr 2020 16:02:53 +0000 (18:02 +0200)
resources/views/head/link.blade.php

index 658ccf1c9857bc2e99623bf9b477c77dae20c117..f7e76be9f5f23a6304b788cddc43387a515afafd 100644 (file)
@@ -1,7 +1,10 @@
-<link rel="canonical" href="{{$page->getCanonicalURL()}}">
+@php
+$currentPage=CubistMenu::getCurrentPage();
+@endphp
+<link rel="canonical" href="{{ $currentPage->getCanonicalURL() }}">
 @foreach($locales['enabled'] as $locale)
 @php
-$alternate=CubistMenu::getCurrentPage()->getTranslatedPage($locale['code']);
+$alternate=$currentPage->getTranslatedPage($locale['code']);
 @endphp
 @if(null!==$alternate)
 <link rel="alternate" hreflang="{{$locale['code']}}" href="{{$alternate->getURL()}}">