I have this button in my Yii2 project:
Html::a('label', ['/attributes/index'], ['class'=>'btn btn-primary']) ;
The button is located in the page:
/site/view
Now what I want to do is pass a parameter when this button gets clicked to the attributes/index page from the site/view page.
To be more specific it is the ID that I want to pass of a particular record from a DB I am viewing.
Cheers.
You can pass parameters as key => value pairs after the route:
See the Yii2 docs: http://www.yiiframework.com/doc-2.0/yii-helpers-baseurl.html#toRoute()-detail