1. Go to this page and download the library: Download depa/dot-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/ */
depa / dot-navigation example snippets
return [
'dot_navigation' => [
//enable menu item active if any child is active
'active_recursion' => true,
//map a provider name to its config
'containers' => [
'default' => [
'type' => 'ArrayProvider',
'options' => [
'items' => [
[
'options' => [
'label' => 'Menu #1',
'route' => [
'route_name' => 'home',
'route_params' => [],
'query_params' => [],
'fragment_id' => null,
'options' => [],
//the below parameters are not used in route generation
//they are used in finding if a page is active by omitting some parameters from the check
'ignore_params' => []
],
],
'attributes' => [
'name' => 'Menu #1',
]
],
[
'options' => [
'label' => 'Menu #2',
'route' => ['route_name' => 'home'/*,...*/],
],
'attributes' => [
'name' => 'Menu #1',
]
]
],
],
],
],
//register custom providers here
'provider_manager' => [],
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.