S
S
Stepan2015-01-23 17:41:59
Yii
Stepan, 2015-01-23 17:41:59

How to wrap html code in Html::a or just add the necessary dynamic url?

There is this code

<?= Html::a(Html::encode($model['title']), ['update', 'id' => $model['id']])?>

You need to somehow wrap the template with this tag, or just add the code to the url, but I can’t figure out how.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stepan, 2015-01-23
@xoma2

echo Url::to(['pr/update', 'id' => $model['id']])
It turns out there is a whole Url helper
www.yiiframework.com/doc-2.0/yii-helpers-url.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question