Pārlūkot izejas kodu

Url absolues (vers backend et frontend)

refactoring
keun pirms 6 gadiem
vecāks
revīzija
5e916e0937
1 mainītis faili ar 5 papildinājumiem un 5 dzēšanām
  1. +5
    -5
      producer/views/layouts/main.php

+ 5
- 5
producer/views/layouts/main.php Parādīt failu

@@ -28,7 +28,7 @@ $producer = $this->context->getProducer() ;
<div id="header-bap">
<div class="container">
<a id="logo" href="<?= Yii::$app->urlManagerFrontend->createUrl(['site/index']); ?>">
<a id="logo" href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">
<img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/laboulange3.png" alt="" />
<span class="text">La boîte à pain</span>
</a>
@@ -116,7 +116,7 @@ $producer = $this->context->getProducer() ;
],
[
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration',
'url' => Yii::$app->urlManagerBackend->createUrl(['site/index']),
'url' => Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index']),
'visible' => isset(Yii::$app->user->identity) && Yii::$app->user->identity->isBoulanger(),
'options' => ['id' => 'btn-administration']
],
@@ -150,9 +150,9 @@ $producer = $this->context->getProducer() ;
<div class="container">
<div class="overflow"></div>
<div class="content">
<a href="<?php echo Url::frontend('site/index') ; ?>">La boîte à pain</a>
<a href="<?php echo Url::frontend('site/mentions') ; ?>">Mentions légales</a>
<a href="<?php echo Url::frontend('site/cgv') ; ?>">CGS</a>
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']) ; ?>">La boîte à pain</a>
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/mentions']) ; ?>">Mentions légales</a>
<a href="<?php echo Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']) ; ?>">CGS</a>
</div>
</div>
</footer>

Notiek ielāde…
Atcelt
Saglabāt