PHP dropdown menu?

  • ultimate11
  • Student
  • Student
  • ultimate11
  • Posts: 86

Post 3+ Months Ago

guys how to add a drop down menu in php sites if your main links are in array the codes below:
Code: [ Select ]
    <div id="mainmenu">
        <?php $this->widget('zii.widgets.CMenu',array(
            'items'=>array(
                
                array('label'=>'Home', 'url'=>array('/site/index')),
                array('label'=>'Courses Offered', 'url'=>array('/site/page', 'view'=>'about')),
                array('label'=>'Admission', 'url'=>array('/site/page', 'view'=>'sample')),
                array('label'=>'Activities', 'url'=>array('/site/page', 'view'=>'link')),
                array('label'=>'Policies', 'url'=>array('/site/page', 'view'=>'link2')),
                array('label'=>'Faculty', 'url'=>array('/site/page', 'view'=>'link3')),
                array('label'=>'Gallery', 'url'=>array('/site/page', 'view'=>'link4')),
                array('label'=>'Campus', 'url'=>array('/site/page', 'view'=>'host')),
                
            ),
        )); ?>
    </div>
  1.     <div id="mainmenu">
  2.         <?php $this->widget('zii.widgets.CMenu',array(
  3.             'items'=>array(
  4.                 
  5.                 array('label'=>'Home', 'url'=>array('/site/index')),
  6.                 array('label'=>'Courses Offered', 'url'=>array('/site/page', 'view'=>'about')),
  7.                 array('label'=>'Admission', 'url'=>array('/site/page', 'view'=>'sample')),
  8.                 array('label'=>'Activities', 'url'=>array('/site/page', 'view'=>'link')),
  9.                 array('label'=>'Policies', 'url'=>array('/site/page', 'view'=>'link2')),
  10.                 array('label'=>'Faculty', 'url'=>array('/site/page', 'view'=>'link3')),
  11.                 array('label'=>'Gallery', 'url'=>array('/site/page', 'view'=>'link4')),
  12.                 array('label'=>'Campus', 'url'=>array('/site/page', 'view'=>'host')),
  13.                 
  14.             ),
  15.         )); ?>
  16.     </div>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • coderRealm
  • Born
  • Born
  • coderRealm
  • Posts: 1

Post 3+ Months Ago

this is quite helpful.. thanks, anyway.. ^_^
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Posts: 3422
  • Loc: Richland, WA

Post 3+ Months Ago

You'd first need to get some javascript code to manage the drop down effect. After that its just a matter of printing that array into the correct format the javascript code requires.
  • ultimate11
  • Student
  • Student
  • ultimate11
  • Posts: 86

Post 3+ Months Ago

where i can get a javascript code i only have a limited knowledge in javascript...

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 38 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.