Yii2 Problems for beginners

hii… I am Avinash and Yii2 beginner …

Hello and welcome. What is your question?

1 Like

how to display view data on index page. when i click on view action on index page

Usually these are separate pages and getting from one page to another is handled by regular links.

1 Like

i tried this method…but…

What didn’t work?

View page not show nehind the index page …

Have you tried what’s in the guide? https://www.yiiframework.com/doc/guide/2.0/en/start-hello

1 Like

how to show index page and view page …under the form page.

how to use MongoDB with Yii2

How to create dropdown inside dropdown in navbar in yii2.
Ex:- in Navbar->Country:-State->disrict->blocks->village,
Explain-Step1:-Click on country(list of contries)
Step2:- click on any country ((suppose India, then show all states of india),
Step3:- click of any state(then show all district ),
step4:- then click any district(show all blocks…)
like this…
can anyone help me to solve all these questions…plzzzz

Hi @Er_Avinash, It seems you haven’t followed “The Definitive Guide to Yii 2.0” as samdark asked. If you have problem with the guide then you might find this channel interesting.

https://www.youtube.com/playlist?list=PLRd0zhQj3CBmusDbBzFgg3H20VxLx2mkF

and this may help you to solve your above problem.

1 Like

not to show dropdown in form page …it’s happen in navbar…suppose like contact icon and home icon on navbar…

Q1:- Can i call another layout(except main.php) in userController…
Q2.In main.php.

<?= Alert::widget() ?> <?= $content ?>
I want to remove this container....if i remove this ...then all designs look bad... so,...How to design my page.
  1. Yes. https://www.yiiframework.com/doc/api/2.0/yii-base-controller#$layout-detail
  2. That’s up to you.

Please prefer creating a separate topic for separate questions. It helps search engines so people would be able to find answers easier afterwards.

yess…got it…thank u so much …sir

Only problem with second one…

Hi Avinash,
Welcome!
You seem to be new to Yii. I would suggest that you go through the guide and then come with the questions you have. All you are asking are covered and would really be helpful to start there and get good foundation

Thank u for suggest me …sir…thank u…