I need to have two buttons on my home page, Login and Register. When user click on Login button I need to render a LoginView, while on Register button there will be RegisterView. I see these questions but these also have fields in model(dynamic model):
Yii2 create a form without a model
I don't want to use any model field, I only want to render different view on click event to different buttons. Or in other words, how can I set a button to call specific controller's action on its click event?
How this can be done with Yii2 framework.
Use
<?= Html::a('label', ['/controller/action'], ['class'=>'btn btn-primary']) ?>