Yii Framework Forum: Nambah Menu - Yii Framework Forum

Jump to content

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

Nambah Menu Rate Topic: -----

#1 User is offline   karmis 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 04-January 13

Posted 04 January 2013 - 09:56 PM

permisi agan sekalian, mau tanya nih. Ada yang tau gimana nambah menu yg sejajar dengan home about dll selain pake extension mbmenu ? mohon bantuannya gan, makasih ;D
0

#2 User is offline   mhdrasad 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 199
  • Joined: 20-April 11
  • Location:Bumi Indonesia

Posted 06 January 2013 - 09:49 PM

View Postkarmis, on 04 January 2013 - 09:56 PM, said:

permisi agan sekalian, mau tanya nih. Ada yang tau gimana nambah menu yg sejajar dengan home about dll selain pake extension mbmenu ? mohon bantuannya gan, makasih ;D


maksudnya gimana gan?. pengen bikin menu selain pake mbMenu?. emang mbMenu kurang bagus ya gan?.
Wait For True Concept or Finish it With Coding Concept .
#chadnox
0

#3 User is offline   ir89zz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 13-January 13

Posted 14 January 2013 - 01:49 AM

buka protected/views/layout/main.php gan tinggal tambahin disitu

<div id="mainmenu">
		<?php $this->widget('zii.widgets.CMenu',array(
			'items'=>array(
				array('label'=>'Home', 'url'=>array('/site/index')),
				array('label'=>'Register', 'url'=>array('/user/create', 'view'=>'about')),
				//array('label'=>'Contact', 'url'=>array('/site/contact')),
				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
				array('label'=>'posting', 'url'=>array('/posting/create'), 'visible'=>!Yii::app()->user->isGuest),
			),
		)); ?>
	</div><!-- mainmenu -->

0

#4 User is offline   mrkoeh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 31-October 12
  • Location:Indonesia

Posted 15 January 2013 - 08:53 PM

Setau saya klo kita pake extention mbMenu, kita bisa nambah menu dari databasenya gan,
itu klo sblumny agan bkin menu yang dinamis. . .
<div class="menu">
                <?php
				$this->widget('ext.mbmenu.Mbmenu',
					array('items'=>TMenu::model()->getMenu(),
				   )
				);
                /*$this->widget('zii.widgets.CMenu', array(
                    'items' => array(
                        array('label' => 'Home', 'url' => array('/site/index')),
                        array('label' => 'About', 'url' => array('/site/page', 'view' => 'about')),
                        array('label' => 'Contact', 'url' => array('/site/contact')),
                        array('label' => 'User', 'url' => array('/tblUserAdmin/admin')),
                        array('label' => 'Login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
                        array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest)
                    ),
                ));*/
                ?>
            </div>


CMIIW. .. hehhe
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