Yii2 Problems for beginners


(Er_Avinash) #1

hii… I am Avinash and Yii2 beginner …


(Alexander Makarov) #2

Hello and welcome. What is your question?


(Er_Avinash) #3

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


(Alexander Makarov) #4

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


(Er_Avinash) #5

i tried this method…but…


(Alexander Makarov) #6

What didn’t work?


(Er_Avinash) #7

View page not show nehind the index page …


(Alexander Makarov) #8

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


(Er_Avinash) #9

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


(Er_Avinash) #10

how to use MongoDB with Yii2


(Er_Avinash) #11

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


(Anil Chaudhari) #12

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.


(Er_Avinash) #13

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


(Er_Avinash) #14

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.

(Alexander Makarov) #15
  1. Yes. https://www.yiiframework.com/doc/api/2.0/yii-base-controller#$layout-detail
  2. That’s up to you.

(Alexander Makarov) #16

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


(Er_Avinash) #17

yess…got it…thank u so much …sir


(Er_Avinash) #18

Only problem with second one…


(Stefano Mtangoo) #19

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


(Er_Avinash) #20

Thank u for suggest me …sir…thank u…