From 360fa023e992c469592db96225848b7f399f711f Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 10 May 2017 12:08:47 +0300 Subject: [PATCH] -Changed alias schema for blog and added alias field to tag --- models/ArticleLang.php | 2 +- models/CategoryLang.php | 2 +- models/TagLang.php | 2 +- views/blog-tag/_form_language.php | 12 ++++++++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/models/ArticleLang.php b/models/ArticleLang.php index 62ac52e..4ece60e 100755 --- a/models/ArticleLang.php +++ b/models/ArticleLang.php @@ -38,7 +38,7 @@ return [ 'slug' => [ 'class' => SlugBehavior::className(), - 'action' => 'article/view', + 'action' => 'blog/article', 'params' => [ 'id' => 'blog_article_id', ], diff --git a/models/CategoryLang.php b/models/CategoryLang.php index e6ede7d..af575e0 100755 --- a/models/CategoryLang.php +++ b/models/CategoryLang.php @@ -32,7 +32,7 @@ return [ 'slug' => [ 'class' => SlugBehavior::className(), - 'action' => 'blog-category/view', + 'action' => 'blog/category', 'params' => [ 'id' => 'blog_category_id', ], diff --git a/models/TagLang.php b/models/TagLang.php index c8332e5..cfa289b 100755 --- a/models/TagLang.php +++ b/models/TagLang.php @@ -35,7 +35,7 @@ return [ 'slug' => [ 'class' => SlugBehavior::className(), - 'action' => 'tag/view', + 'action' => 'blog/tag', 'params' => [ 'id' => 'blog_tag_id', ], diff --git a/views/blog-tag/_form_language.php b/views/blog-tag/_form_language.php index a6bd3a1..70ffc26 100755 --- a/views/blog-tag/_form_language.php +++ b/views/blog-tag/_form_language.php @@ -1,5 +1,6 @@ -field($model_lang, '[' . $language->id . ']label') - ->textInput([ 'maxlength' => true ]); ?> +field($model_lang, '[' . $language->id . ']label') + ->textInput([ 'maxlength' => true ]); ?> + +field($model_lang, '[' . $language->id . ']aliasValue'), + [ '/alias/slugify' ], + $attributeField +) + ->textInput([ 'maxlength' => true ]); ?> -- libgit2 0.21.4