2017 © Pedro PelĂĄez
 

silverstripe-module silverstripe-menumanager-squared

SilverStripe MenuManager Squared

image

marketo/silverstripe-menumanager-squared

SilverStripe MenuManager Squared

  • Wednesday, April 12, 2017
  • by nathanbrauer
  • Repository
  • 11 Watchers
  • 2 Stars
  • 2,192 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

SilverStripe Menu Manager Squared

Installation

Composer

Installing from composer is easy,, (*1)

Create or edit a composer.json file in the root of your SilverStripe project, and make sure the following is present., (*2)

{
    "require": {
        "marketo/silverstripe-menumanager-squared": "~1.0.0"
    }
}

After completing this step, navigate in Terminal or similar to the SilverStripe root directory and run composer install or composer update marketo/silverstripe-menumanager-squared depending on whether or not you have composer already in use., (*3)

Usage

Add MenuSets to your yaml file with max depth., (*4)

The depth variable demarcates the allowed ChildItems of MenuItems of a particular MenuSet., (*5)

A MenuSet with depth 0 can only have MenuItems, a depth of 1 indicates that this MenuSet’s first MenuItems can have Child Items, a depth of 2 indicates that this MenuSet’s MenuItems can have Child Items that can have Child Items of their own etc., (*6)

MenuSet:
  default_sets:
    - Main
    - Main2
    - Footer
  Main:
    depth: 2
  Main2:
    depth: 1
  Footer:
    depth: 1

MenuSet depth defaults to 1., (*7)

Menu Manger Squared adds the following fields to MenuItem: 1. ChildItems 2. Image, (*8)

Separators can be identified by the class MenuItem_Separator, (*9)

Usage in template

<% loop $MenuSet('YourMenuName').MenuItems %>
    <a href="$Link" class="$LinkingMode">$MenuTitle</a>
    <ul>
        <% loop $ChildItems %>
            <% if $ClassName = 'MenuItem' %>
                <li>
                    <label>$MenuTitle</label>
                    $Image
                    <% loop $ChildItems %>
                        <p><a href="$Link" class="$LinkingMode">$MenuTitle</a></p>
                    <% end_loop %>
                </li>
            <% else_if $ClassName = 'MenuItem_Separator' %>
                <hr>
            <% end_if %>
        <% end_loop %>
    </ul>
<% end_loop %>

The Versions

12/04 2017

dev-master

9999999-dev

SilverStripe MenuManager Squared

  Sources   Download

BSD-3-Clause

The Requires

 

by Nathan J. Brauer
by Brandon J. Marshall

silverstripe members default

12/04 2017

1.1.1

1.1.1.0

SilverStripe MenuManager Squared

  Sources   Download

BSD-3-Clause

The Requires

 

by Nathan J. Brauer
by Brandon J. Marshall

silverstripe members default

05/04 2017

1.1.0

1.1.0.0

SilverStripe MenuManager Squared

  Sources   Download

BSD-3-Clause

The Requires

 

by Nathan J. Brauer
by Brandon J. Marshall

silverstripe members default

05/04 2017

dev-feature/new-menuitem-separator

dev-feature/new-menuitem-separator

SilverStripe MenuManager Squared

  Sources   Download

BSD-3-Clause

The Requires

 

by Nathan J. Brauer
by Brandon J. Marshall

silverstripe members default

01/03 2017

1.0.0

1.0.0.0

SilverStripe MenuManager Squared

  Sources   Download

BSD-3-Clause

The Requires

 

by Nathan J. Brauer
by Brandon J. Marshall

silverstripe members default