V
V
Vadim Timoshenko2015-11-12 17:24:46
Yii
Vadim Timoshenko, 2015-11-12 17:24:46

Where can I find a widget display template in Yii?

There is a menu that is displayed in the template file with this code:

<?php $this->widget("MenuWidget",array("id_menu"=>4,"template"=>"topmenu"));  ?>

My understanding is that I have to find a file called topmenu.php somewhere in the layouts folder. But unfortunately I can't find it.
I need to change the sorting of menu items. Menu items are set in the admin panel, they have a sorting option, but unfortunately it does not work.
Where can I find the desired file, where can I enable / change sorting? Thank you.
PS: getting acquainted with yii through a ready-made project =\

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaliy Orlov, 2015-11-12
@orlov0562

widgets in Yii usually generate html themselves without referring to templates, look for the MenuWidget class and see where they put the template there. You can search directly in php files, by substring:
"class MenuWidget"

V
Viktor, 2015-11-12
@master2016

If you have a standard framework architecture, widget views are located here
/protected/components/views/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question