sfTabMenuPeytzPlugin - 0.0.1

Easy tabbed navigation for Symfony 1.2

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfTabMenuPeytzPlugin

Couldn't really find any plugins that suited my needs without creating massive overheads for simple tabbed navigation. So i created my own. This is developed by Peytz & Co (hb@peytz.dk). All text returned to the end user, is run through I18n if it is enabled, with the catelauge param set to sfTabMenuPeytz.

Installation

Installation notes goes here.

Documentation

Usage

This plugin is extreamly easy to use. In your views you can render a tabbed menu like this:

echo new sfTabMenuPeytz('TabsName'[, array()])

Where the second parameter is a suffix for the route configurations, this makes you able to have routes like /module/action/username/foobar as the array is suffixed as paramameters on all routes.

Configuration

The configuration is also very easy, here is a sample, the rest of the configuration options can bee seen in the sfTabMenuPeytz Class.

MainNavigation:
    config:
        content: "<span>%title%</span>"
 
    tabs:
        frontpage:
            title: Forsiden
            route: @homepage
            default: true
            match:
                module: article
        articles:
            title: Artikler
        users:
            title: Brugere
            route: @default?module=profile
            match:
                module: profile
        community:
            title: Community
        events:
            title: Events
        forum:
            title: Forum
        support:
            title: Support
 
Profile:
    config:
        content: "%title%"
 
    tabs:
        index:
            title: Profil
            route: "profile/index"
            default: true
            match:
                module: message
                action: index
        expanded:
            title: Udvidet
            route: "profile/expanded"
            default: true
            match:
                module: message
                action: index
 
        gallery:
            title: Galleri
            route: "profile/gallery"
            default: true
            match:
                module: message
                action: index

The plugin needs a tabs.yml file in the config dir of the app that is calling sfTabMenuPeytzPlugin.