twokings / hierarchy
Simple hierarchical content for Bolt 5
Installs: 654
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Type:bolt-extension
Requires
- php: >=7.1.3
Requires (Dev)
- bolt/core: ^5.0.0
- symplify/easy-coding-standard: ^10.2
README
Hierarchical content using menu.yml
for Bolt 5.
Configuration
menu
: List of menus to check for.
Twig Functions and Filters
Generating nice URLs like /foo/bar
requires you to use the hMenu
function and the hLink
filter.
hMenu('main')
: Use this function to get nice URLs in your menus.getParent(record)
getParents(record)
getSiblings(record)
getChildren(record)
record|hLink
: Use this filter on records to get nice URLs.
Routes
Add the following to your routes.yaml
to allow nice URLs.
hierarchicalRoute:
resource: 'TwoKings\Hierarchy\Controller\Controller'
type: annotation