Skip to content

Commit

Permalink
Added link to frontend from pages
Browse files Browse the repository at this point in the history
  • Loading branch information
robertobadjio committed Mar 3, 2018
1 parent a824229 commit 7ad4a60
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion views/page/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use b4djo\seo\models\SeoPage;
use yii\helpers\Html;
use yii\grid\GridView;

Expand All @@ -20,7 +21,20 @@
['class' => 'yii\grid\SerialColumn'],

//'id',
'route',
[
'attribute' => 'route',
'value' => function (SeoPage $data) {

return Html::a(
Html::encode($data->route),
Yii::$app->urlManagerFrontend->baseUrl . $data->route,
[
'target' => '_blank',
]
);
},
'format' => 'raw',
],

['class' => 'yii\grid\ActionColumn'],
],
Expand Down

0 comments on commit 7ad4a60

Please sign in to comment.