PHP code example of jonom / silverstripe-betternavigator
1. Go to this page and download the library: Download jonom/silverstripe-betternavigator 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/ */
jonom / silverstripe-betternavigator example snippets
public function showBetterNavigator()
{
// A user-defined setting
return $this->ShowDebugTools;
}
// EventsPageController.php
/**
* Return an alternative URL for the BetterNavigator Edit in CMS link.
* @return string
*/
public function BetterNavigatorEditLink()
{
$event = $this->displayedEvent();
return $event->canEdit() ? CMSEditLinkAPI::find_edit_link_for_object($event) : false;
}