This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function render_menu_navigation($menu_name,$theme_alter = ''){ | |
//Set system menu mobile | |
$menu_tree = \Drupal::menuTree(); | |
// Build the typical default set of menu tree parameters. | |
$parameters = $menu_tree->getCurrentRouteMenuTreeParameters($menu_name); | |
// Load the tree based on this set of parameters. | |
$tree = $menu_tree->load($menu_name, $parameters); | |
// Transform the tree using the manipulators you want. | |
$manipulators = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
/** | |
* @file | |
* Get the current URL path via Drupal 8 route name and twig function. | |
*/ | |
#} | |
<a href="{{ url('<current>') }}">Current page</a> |