Commit 360fa023e992c469592db96225848b7f399f711f
1 parent
ee588281
-Changed alias schema for blog and added alias field to tag
Showing
4 changed files
with
13 additions
and
5 deletions
Show diff stats
models/ArticleLang.php
models/CategoryLang.php
models/TagLang.php
views/blog-tag/_form_language.php
1 | 1 | <?php |
2 | 2 | |
3 | + use artbox\core\helpers\SlugifyDecorator; | |
3 | 4 | use artbox\core\models\Language; |
4 | 5 | use artbox\weblog\models\ArticleLang; |
5 | 6 | use yii\web\View; |
... | ... | @@ -12,5 +13,12 @@ |
12 | 13 | * @var View $this |
13 | 14 | */ |
14 | 15 | ?> |
15 | -<?= $form->field($model_lang, '[' . $language->id . ']label') | |
16 | - ->textInput([ 'maxlength' => true ]); ?> | |
16 | +<?= $attributeField = $form->field($model_lang, '[' . $language->id . ']label') | |
17 | + ->textInput([ 'maxlength' => true ]); ?> | |
18 | + | |
19 | +<?= SlugifyDecorator::decorate( | |
20 | + $form->field($model_lang, '[' . $language->id . ']aliasValue'), | |
21 | + [ '/alias/slugify' ], | |
22 | + $attributeField | |
23 | +) | |
24 | + ->textInput([ 'maxlength' => true ]); ?> | ... | ... |