A
A
arab7892015-04-15 10:39:01
Yii
arab789, 2015-04-15 10:39:01

Yii. How to add search form to CMenu?

There is a menu widget:

<?php $this->widget('zii.widgets.CMenu',array(
      'items'=>array(
        array('label'=>'Сообщество', 'url'=>'', 'linkOptions' => array('target' => '_blank' )),
        array('label'=>'Поддержка', 'url'=>array('')),
        array('url'=>Yii::app()->getModule('user')->logoutUrl, 'label'=>Yii::app()->getModule('user')->t("Logout").' ('.Yii::app()->user->name.')', 'visible'=>!Yii::app()->user->isGuest),
        array('url'=>Yii::app()->getModule('user')->profileUrl, 'label'=>Yii::app()->getModule('user')->t("Profile"), 'visible'=>!Yii::app()->user->isGuest),
        array('url'=>Yii::app()->getModule('user')->registrationUrl, 'label'=>Yii::app()->getModule('user')->t("Register"), 'visible'=>Yii::app()->user->isGuest),
        array('url'=>Yii::app()->getModule('user')->loginUrl, 'label'=>Yii::app()->getModule('user')->t("Login"), 'visible'=>Yii::app()->user->isGuest),
        array('label'=>'Язык', 'url'=>array('')),
      ),
    )); ?>

How to add a search form to the middle of the menu?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question