- 🇺🇸United States jim.shreds
workaround for me:
in your theme directory theme file:
"offCanvas" => [
"position"=> "right",
]
is what you are looking to add.themename.theme
themename_preprocess_page(&$variables) {
$variables['#attached']['drupalSettings']['responsive_menu']['custom'] = [
'options' => [
'navbar' => [
'add' => TRUE,
'title' => 'This is a test',
],
"offCanvas" => [
"position"=> "right",
]
],
'config' => [
'classNames' => [
'selected' => 'my-custom-menu--active-trail',
],
]
];
} - 🇩🇪Germany vistree
Hi, the solution from @jim.shreds does not work for me. I tried:
/** * Implements hook_preprocess_page(). */ function ditrare_preprocess_page(&$variables) { $variables['#attached']['drupalSettings']['responsive_menu']['custom'] = [ 'options' => [ 'navbar' => [ 'add' => TRUE, 'title' => 'This is a test', ], "offCanvas" => [ "position"=> "left", ] ], 'config' => [ 'classNames' => [ 'selected' => 'my-custom-menu--active-trail', ], ] ]; }
What I really want is to use the mmenu option left-front or right-front - so that the offcanvas is overlaying the content instead of moving the content from the side to make space for the offcanvas menu.
Should the "offCanvas" option work within theme-page-hook? + Should the position: right-front work?
- First commit to issue fork.
- 🇮🇳India rishu_kumar
rishu_kumar → changed the visibility of the branch 3291568-slide-out-from to hidden.
- 🇮🇳India rishu_kumar
rishu_kumar → changed the visibility of the branch 3291568-slide-out-from to active.