rlmenu Simple menu widget for its corresponding related link pages

  1. Requirements
  2. Usage
  3. Resources

This is my first extension, so any feedback and comments will be apperciated.

There are times when one needs to make the main menu item (which does not have any sub-menu) show as active for its corresponding related links; just like for the crud operation where create, update and admin type of links, the menu item will not display in active state.

Requirements

Tested with Yii 1.1.10 and 1.1.12. may work on other versions

Usage

This extension can be used same as CMenu except it take one extra parameter in-order to display the result, which is:

  • $related_links_arr: an array of the related links which you want to associate with the menu item.

For the demonstration purpose, i have used this widget with default menu items.

$this->widget('ext.rlmenu.RLMenu', array(
                    'items' => array(
                        array('label' => 'Home', 'url' => array('/site/index')),
                        array('label' => 'Project', 'url' => array('/project/index'), 'relatedLinks' => array('/project/create', '/project/admin', '/project/view', '/project/update')),
                        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)
                    ),
                ));

Resources

3 0
3 followers
469 downloads
Yii Version: Unknown
License: BSD-2-Clause
Category: User Interface
Developed by: Ibrar Turi
Created on: May 20, 2013
Last updated: 11 years ago

Downloads

show all

Related Extensions