Change the Layout's Banner from the view

How can I do the following:

Page structure:

*See attached file

I want to have Header, Side Menu and Footer on the layout to share it between 15 different pages.

I want to change Banner and Main.

How can I do that?

Can I have Banner on the Layout and change it from the View?

Thank you

As you want to have banner next to header then you have use a widget for it in main.php

How can I change the widget parameter from the view? I’m assuming the widget is used in the layout and from different views I will be able to change the banner image.

I’m very new on Yii, sorry

There are two ways to get it done.

User custom array which you can fill with the values of actions and banners to be displayed when these actions are called.

Second is use of DB to store these values and get banner for the selected/current action.