Im trying to build a simple view with extra options(parameters). When I use the /product/ and /product/index the view will show, but I want to add paramaters to select a post per id.
As im working inside a already build yii2 project maybe the settings are not correct or need to be set, i dont know but when I do use a parameter it will show me a page not found error(inside the layout).
www.example.com/products/ // view works
www.example.com/products/index/ // view works
www.example.com/products/id/extraparam //view not working (how I want it to be)
controller
public $defaultAction = 'index';
public function actionIndex( $id , $par)
{
$proid = $id; // we want to use this if present
$extra = $par; // we want to use this if present
// as we do not need the layout
$this->layout = false;
return $this->render('index');
}