2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-menu

Creates multiple menus.

image

gorriecoe/silverstripe-menu

Creates multiple menus.

  • Sunday, July 1, 2018
  • by gorriecoe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 167 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 519 % Grown

The README.md

Silverstripe menus

Adds multiple menus that are defined via yml and managed via the cms., (*1)

Installation

Composer is the recommended way of installing SilverStripe modules., (*2)

composer require gorriecoe/silverstripe-menu

Requirements

Maintainers

Creating custom menus

As it is common to reference MenuSets by slug in templates, you can configure sets to be created automatically during the /dev/build task. These sets cannot be deleted through the CMS., (*3)

gorriecoe\Menu\Models\MenuSet:
  sets:
    main: Main menu
    secondary: Another menu

Nested and flat menus

By default menus will be flat, which means links can not have child links associated with them. If you need a nested menu structure, you can do so by adding allow_children: true to the yml file as shown below., (*4)

gorriecoe\Menu\Models\MenuSet:
  sets:
    footer:
      title: Footer menu
      allow_children: true

Once you have created your menus you can add links in the admin area. The fields are inherited from silverstripe link., (*5)

If you need to automatically add links to a menu after the creation of a page, you can do so by adding the following extension to page and defining owns_menu., (*6)

Page:
  extensions:
    - gorriecoe\Menu\Extensions\SiteTreeAutoCreateExtension
  owns_menu:
    - main
    - footer

Usage in template

<ul>
    <% loop MenuSet('footer') %>
        <li>
            {$Me}
        </li>
    <% end_loop %>
</ul>

See silverstripe link for more template options., (*7)

The Versions

01/07 2018

dev-master

9999999-dev http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

30/05 2018

1.1.0

1.1.0.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

03/05 2018

1.0.6

1.0.6.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

03/05 2018

1.0.5

1.0.5.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

15/03 2018

1.0.4

1.0.4.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

13/03 2018

1.0.3

1.0.3.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

12/03 2018

1.0.2

1.0.2.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

12/03 2018

1.0.1

1.0.1.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular

12/03 2018

1.0.0

1.0.0.0 http://github.com/gorriecoe/silverstripe-menu

Creates multiple menus.

  Sources   Download

BSD-3-Clause

The Requires

 

by Gorrie Coe

cms silverstripe link menu modular