Yii Framework Forum: Cmenu Deki Submenu Görünümü - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cmenu Deki Submenu Görünümü

#1 User is offline   selo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 08-November 13

Posted 06 January 2014 - 11:36 AM

Bildirimlerimlerin altına tek sırada 2 menu katmanı çıkıyor.oysaki dropdown cıkması gerekmez miydi?
$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'AnaSayfa', 'url'=>array('/site/index')),
                                array('label'=>'Sayfam', 'url'=>array('/site/mypage'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Arkadaşlar', 'url'=>array('/user/myfriends'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Bildirimler', 'url'=>array('/site/contact'), 'visible'=>!Yii::app()->user->isGuest,
                                    'items' => array(
                                        array('label'=>'Yorumlar', 'url'=>array('comments/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Eğitimler', 'url'=>array('education/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Etkinlikler', 'url'=>array('comments/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Mesajlar', 'url'=>array('education/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Formlar', 'url'=>array('comments/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Makaleler', 'url'=>array('education/index'),'visible'=>!Yii::app()->user->isGuest)
                                        )
                                    ),
                                array('label'=>'Hesabım', 'url'=>array('/user/newupdate', 'id'=> $id ), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Giriş', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Çıkış ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Kayıt', 'url'=>array('/user/register'), 'visible'=>Yii::app()->user->isGuest)
			),
		));

0

#2 User is offline   selo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 08-November 13

Posted 13 January 2014 - 09:56 AM

$this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'AnaSayfa', 'url'=>array('/site/index')),
                                array('label'=>'Sayfam', 'url'=>array('/site/mypage'), 'visible'=>!Yii::app()->user->isGuest,
                                    'linkOptions '=> array('encode'=>false, 'class'=>'dropdown-toggle', 'data-toggle'=>'dropdown'),
                                    'itemOptions '=> array('class'=>'dropdown'),
                                    'submenuOptions '=> array('class'=>'dropdown-menu'),
                                    'items' => array(
                                        array('label'=>'Arkadaşlar', 'url'=>array('/user/myfriends'), 'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Bildirimler', 'url'=>array('/site/contact'), 'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Yorumlar', 'url'=>array('/comments/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Eğitimler', 'url'=>array('/education/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Etkinlikler', 'url'=>array('/activity/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Mesajlar', 'url'=>array('/messages/index'),'visible'=>!Yii::app()->user->isGuest),
                                        array('label'=>'Makaleler', 'url'=>array('/article/index'),'visible'=>!Yii::app()->user->isGuest)
                                )),
                                array('label'=>'Hesabım', 'url'=>array('/user/newupdate', 'id'=> Yii::app()->user->getId()), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'Giriş', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Çıkış ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
                                array('label'=>'Kayıt', 'url'=>array('/user/register'), 'visible'=>Yii::app()->user->isGuest)
			),
		));


görunumu

Posted Image

nerede hata yapıyorum ?
0

#3 User is offline   McQueen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 138
  • Joined: 13-August 11
  • Location:Istanbul/Turkey

Posted 13 January 2014 - 11:07 PM

Cmenu sadece <ul><li> taglerini oluşturmak için kullanılır.

ancak js ve css tanımlamanın ardından drop down menulerini oluşturabilirsin.
0

#4 User is offline   selo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 08-November 13

Posted 14 January 2014 - 06:47 AM

burada bi örnek var

onu alıp koyuyorum mesela o da calışmıyor. sen de bi ornek varsa

http://www.yiiframew...enu-using-cmenu
0

#5 User is offline   selo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 52
  • Joined: 08-November 13

Posted 14 January 2014 - 07:00 AM

css eklemek yetiyormuş.

tşk.
0

#6 User is offline   McQueen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 138
  • Joined: 13-August 11
  • Location:Istanbul/Turkey

Posted 14 January 2014 - 07:54 AM

View Postselo, on 14 January 2014 - 07:00 AM, said:

css eklemek yetiyormuş.

tşk.


Rica ederim.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users