PHP code example of belugadigital / kirby-navigation

1. Go to this page and download the library: Download belugadigital/kirby-navigation 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/ */

    

belugadigital / kirby-navigation example snippets


 echo $site->navigation()->toNavigationMarkup(); 

 $site->navigation()->toNavigationArray(); 

$attributes['class']='navigation-item navigation-item-' . $depth;

   if ($items=$site->navigation()->toNavigationStructure()): 

return [
  'chrisbeluga.navigation.edit_title' => TRUE,
  'chrisbeluga.navigation.edit_popup' => TRUE,
  'chrisbeluga.navigation.edit_target' => FALSE,
  'chrisbeluga.navigation.edit_class' => FALSE,
  'chrisbeluga.navigation.edit_anchor' => FALSE,
];