PHP code example of arillo / silverstripe-elements-menu

1. Go to this page and download the library: Download arillo/silverstripe-elements-menu library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arillo / silverstripe-elements-menu example snippets




use SilverStripe\CMS\Model\SiteTree;
use Arillo\Elements\Menu\ElementsMenu;

class Page extends SiteTree
{
    // optional configure element relation name you want to use as menu.
    // Default: Elements
    private static $elements_menu_relationname = '<YOUR_RELATION_NAME>';

    // can be used to deactivate inpage-menus for certain SiteTree subclasses.
    private static $disable_elements_menu = true;

    // add this
    use ElementsMenu;
}