tyo:
udah saya hapus gan , kok masih tetap gak bisa ya ?? saya ikutin aturan script ini :
<?php $this->widget('bootstrap.widgets.BootNavbar', array(
'fixed'=>false,
'brand'=>'Project name',
'brandUrl'=>'#',
'collapse'=>true, // requires bootstrap-responsive.css
'items'=>array(
array(
'class'=>'bootstrap.widgets.BootMenu',
'items'=>array(
array('label'=>'Home', 'url'=>'#', 'active'=>true),
array('label'=>'Link', 'url'=>'#'),
array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
array('label'=>'Action', 'url'=>'#'),
array('label'=>'Another action', 'url'=>'#'),
array('label'=>'Something else here', 'url'=>'#'),
'---',
array('label'=>'NAV HEADER'),
array('label'=>'Separated link', 'url'=>'#'),
array('label'=>'One more separated link', 'url'=>'#'),
)),
),
),
'<form class="navbar-search pull-left" action=""><input type="text" class="search-query span2" placeholder="Search"></form>',
array(
'class'=>'bootstrap.widgets.BootMenu',
'htmlOptions'=>array('class'=>'pull-right'),
'items'=>array(
array('label'=>'Link', 'url'=>'#'),
'---',
array('label'=>'Dropdown', 'url'=>'#', 'items'=>array(
array('label'=>'Action', 'url'=>'#'),
array('label'=>'Another action', 'url'=>'#'),
array('label'=>'Something else here', 'url'=>'#'),
'---',
array('label'=>'Separated link', 'url'=>'#'),
)),
),
),
),
)); ?>
dari cniska.net/yii-bootstrap/
tapi dropdown nya ko gak bisa ia gan ??
mohon penjelasanya gan
ni aku ada contoh bootstrap dengan drop down menu
<?php
$this->widget('zii.widgets.CMenu', array(
'htmlOptions' => array('class' => 'pull-right nav'),
'submenuHtmlOptions' => array('class' => 'dropdown-menu'),
'itemCssClass' => 'item-test',
'encodeLabel' => false,
'items' => array(
array('label' => 'Home', 'url' => array('/post/index')),
// array('label' => 'About Themes', 'url' => array('site/page', 'view' => 'about')),
array('label' => 'About Themes <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
'items' => array(
array('label' => 'About Theme', 'url' => array('site/page', 'view' => 'about')),
array('label' => 'Forms', 'url' => array('site/page', 'view' => 'forms')),
array('label' => 'Graphs', 'url' => array('site/page', 'view' => 'graphs')),
array('label' => 'Interface', 'url' => array('site/page', 'view' => 'interface')),
array('label' => 'Tables', 'url' => array('site/page', 'view' => 'tables')),
array('label' => 'Typography', 'url' => array('site/page', 'view' => 'typography')),
)),
array('label' => 'Rights', 'url' => array('/rights/assignment/view'), 'visible' => !Yii::app()->user->isGuest),
array('label' => 'Post <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
'items' => array(
array('label' => 'Post', 'url' => array('/post/index')),
array('label' => 'Create Post', 'url' => array('/post/create')),
), 'visible' => !Yii::app()->user->isGuest),
array('label' => 'User <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
'items' => array(
array('label' => 'User', 'url' => array('/user/index')),
array('label' => 'Create User', 'url' => array('/user/create')),
), 'visible' => !Yii::app()->user->isGuest),
array('label' => 'Forum <span class="caret"></span>', 'url' => '#', 'itemOptions' => array('class' => 'dropdown', 'tabindex' => "-1"),
'linkOptions' => array('class' => 'dropdown-toggle', 'data-toggle' => "dropdown"),
'items' => array(
array('label' => 'Forum', 'url' => array('/sforum')),
array('label' => 'Forum Admin', 'url' => array('/sforum/admin')),
), 'visible' => !Yii::app()->user->isGuest),
array('label' => 'Contact Us', '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),
),
));
?>
coba di utak-atik deh… ntar kamu bakalan ngerti dengan sendiri…
have fun ! selamat koding…