PHP code example of micschk / silverstripe-rightsidebar
1. Go to this page and download the library: Download micschk/silverstripe-rightsidebar 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/ */
micschk / silverstripe-rightsidebar example snippets
use Restruct\RightSidebar\RightSidebar;
$fields->addFieldsToTab('Root.Main', RightSidebar::create('Options'));
$fields->addFieldsToTab('Root.Main.Options', array(
$publishDate = DatetimeField::create("PublishDate", "Publish Date"),
TextField::create('Author')
));
// Add to Main tab (fixed width) and render an outer template to deal with our custom layout
$fields->addFieldsToTab('Root.Main', RightSidebar::create('Options'));
$fields->fieldByName('Root')->setTemplate('Restruct\RightSidebar\Forms\RightSidebarInner');
// OR: Add it full-screen (collapsible) and render an outer template to deal with our custom layout
$fields->insertBefore(RightSidebar::create('Options'), 'Root');
$fields->fieldByName('Root')->setTemplate('Restruct\RightSidebar\Forms\RightSidebar');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.