We've moved! You can find modules, themes and widgets on http://addons.silverstripe.org.
This page will no longer be updated, and disappear soon. Module maintainers, please read our announcement to find out how to add your modules there.

MenuManager [v0.1]

Maintainer(s): Cetinick, andrew
Supported by: Community

Module for managing menus in your application.  Menus are administrated in the backend and can be displayed anywhere in your page templates.

This module provides a flexible way of adding menus into your application. 

Generating menus off the sitemap can be quite difficult, and often users would like to manage the menu in a separate admn screen.  With this module you can add multiple menus, add menu items to menus and link them to pages in your sitemap.   

To render a menu in your page templates you will need to add this function into your Page.php class (for now only way I could think of doing it).

    function RenderMenu($reference) {
        $menu = DataObject::get_one('Menu', "Reference = '" . $reference."'");
        if ($menu) {
            return $menu->Render();
        } else {
            return "";
        }
    }

class Page extends SiteTree {

....

    function RenderMenu($reference) {

        $menu = DataObject::get_one('Menu', "Reference = '" . $reference."'");

 

        if ($menu) {

            return $menu->Render();

        } else {

            return "";

        }

    }

...

}

You can now use $RenderMenu(<REFERENCE>) in your templates to generate your menu!

Menus can also be customised in the administration to add id, and class attributes to the generated HTML.

 

Module screenshot

Release(s)

  • Latest release

    Version: [v0.1]
    Date: 2011-11-20
    Compatible with: SilverStripe 2.4
    Download: No Download Available

    Git access:
    Branch: master
    Tag: HEAD

  • Latest master build

    To get a preview of our next release, download the latest build of unstable git master branch here. Please be careful: this is more likely to contain bugs, especially on modules undergoing a lot of development.

    SHA hash: 9f0d422175786979acde117abc021924e125c422
    Build Date: 2011-06-11
    Download: silverstripe-menumanager-master-HEAD.tar.gz

    Unstable Git access: git://github.com/acetinick/silverstripe-menumanager.git

 
 

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.