Development

sfBreadNav

You must first sign up to be able to contribute.

Version 1 (modified by jarro, 10 years ago)
v1

sfBreadNav 1.0.4 April 24, 2008

A very basic navigation system for Symfony 1.1 templates. This is a lightweight alternative for when you just want a quick way to add navigation to a site or prototype.

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. Includes ie hacks for ie5.5 and ie6

Requirements

Symfony 1.1

sfPropelActAsNestedSetPlugin http://trac.symfony-project.com/wiki/sfPropelActAsNestedSetBehaviorPlugin

sfGuardPlugin http://trac.symfony-project.com/wiki/sfGuardPluginFor11

Installation

Install plugin

$ php symfony plugin:install http://plugins.symfony-project.com/sfBreadNav

$ php symfony propel:build-all

$ php symfony cc

If your going to use the Menu generator ensure that the web assets were copied to the web directory These are just the css files for the nav bar.

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

Each node requires a name, module and action. Credential is optional.

To simply 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.

-Setting up bread crumb

add the following line to your template body.

<?php include_partial('sfBreadNav/breadcrumb') ?>

-Setting up the navigation menu

Add the following to your template body.

<?php include_partial('sfBreadNav/navmenu') ?>

Add the following to your template head.

<link rel="stylesheet" type="text/css" media="screen" href="/css/menuh.css" />
<?php include_partial('sfBreadNav/iehack') ?>

To Do

-high priority Enable caching of menu and breadcrumb. Will attempt as soon as the 1.1 cache documentation is updated.

-medium priority Enable I8ln

-low priority Multiple menu trees. To allow seperate menus for frontend and backend etc. Improve the default css menu theme, improve the admin theme.

License

LGPL -Author: Jarred Freeman