Yii
- 35 ответов
- 0 вопросов
13
Вклад в тег
foreach ($children as $key => $child) {
$children[$key]['href'] = $this->url->link('product/category', 'path='.
$this->request->get['path'].'_'.$child['category_id'].$url);
}
foreach ($children as &$child) {
$child['href'] = $this->url->link('product/category', 'path='.
$this->request->get['path'].'_'.$child['category_id'].$url);
}
echo(' '.'<a href="Url::toRoute(['controller/action', 'char' => $abc[$j]']);">'.$abc[$j].' '.'</a>');
public actionAuthors($char = null)
{
$model = Authors::find();
if($char) {
$model->where(['like', 'name', '%'.$char, false])
}
return $this->render('view', ['model' => $model]);
}