sfBreadNav2Plugin
1.1.3stable
for sf 1.4sf 1.3sf 1.2 and Propel
MIT
BreadNav2 consists of 3 parts.
Menu manager, allows creation of multiple non conflicting drop down menu trees with user credential awareness.
Menu generator, will use the current users credentials to generate a variable width drop down menu.
Breadcrumb generator, will generate a breadcrumb based on the users requested page in the menu tree.
Drop down menu is css based for search engine compatibility and easy customization. Looks consistent in all major browsers. *IE6 doesn't support some rollover effects.
Menus are cached so there's no performance hit.
Developers
License
Copyright (c) <2009> <Jarred Freeman>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
BreadNav2 Plugin
BreadNav2 works with symfony 1.2, sfGuardPlugin and propel 1.3's built in nested sets. Allows the mangagment of a navigational tree for the purpose of generating a bread crumb and credential controlled menu. Drop down menu is css based for search engine compatibility and easy customization. Features include unlimited number of menus, so you can create seperate menus for frontend and backend apps and render multiple menus for a single app. After making any changes to the menu be sure to clear the cache if you have application caching enabled. The breadcrumb and nav menu will be cached when allowed. Supports i18n
Requirements
Symfony 1.2
sfGuardPlugin
Propel 1.3
Installation
Configuration
Setting up admin panel.
In your backend add sfBreadNavAdmin module to your settings.yml
Example
all:
.settings:
enabled_modules: [default, sfGuardGroup, sfGuardUser, sfGuardPermission, sfBreadNavAdmin]
http://localhost/backend.php/sfBreadNavAdmin
First you need to create a menu, the name is used to identify the menu in the templates.
Next define a home page. If you wish to hide this button simply give an unused credential such as hide.
Each node requires a name and module; actions and credentials are optional. Also any valid URL or route can be subsituted for a module.
To hide a menu button for people not logged in set the credential to authenticated.
Credentials do not cascade so you can apply them to nodes individually and orphaned nodes will propogate up.
The catch all flag is used to select a default bread crumb for any actions in a module without their own nav bar entry.
Setting up bread crumb
Add the following line to your template body.
<?php include_partial('sfBreadNav/breadcrumb', array('menu' => 'menu_name')) ?>
Setting up the navigation menu
Add the following to your template body.
<div id='navmenu'>
<?php include_partial('sfBreadNav/navmenu', array('menu' => 'menu_name')) ?>
</div>
Add the following to your template head.
<link rel="stylesheet" type="text/css" media="screen" href="/sfBreadNav2Plugin/css/menuh.css" />
Plugin permissions
Make sure the plugin permissions are set in the config/Configuration.class.php file.
public function setup(){
$this->enablePlugins('sfPropelPlugin');
$this->enablePlugins('sfGuardPlugin');
$this->enablePlugins('sfBreadNav2Plugin');
}