Does anyone have any idea how to print a menu in Drupal 8?
I've been trying to get it with something like {{ menu_primary }} but that doesn't work. I have several custom menus that I basically can't get on a page.
If I am understanding this correctly, the best way to do this would be to print a region in your theme and then place the menu via the block interface into that region. This would reduce any custom coding dependency to your menu and allow your theme to focus on the region layout it provides to your content (including menus).
Here is a link to the docs explaining how to properly setup regions in a D8 theme:
https://www.drupal.org/node/2469113
I hope that helps!
Have fun,
Nick
if you have using bootstrap css and want print sub menu this done easily.hope this useful for you.
https://knackforge.com/blog/pathirakaliappan/create-multi-level-bootstrap-menu-in-Drupal-8
Related
I am trying to implement a navigation menu same as https://www.santaferelo.com/
On top bar, it has two links as Personal and business which each opens to the pages with the different main menus.
So far I created similar layout using elementor with two buttons as personal and business but can't figure out how do I show which one is active and how do I change the Main menu accordingly.
Kindly provide me with a direction or any help is appreciated.
Thank you in advance.
Turns out it is a lot simpler than I thought.
You can just use a specific plugin to add a conditional menu to the WordPress website and add conditions to display menus.
Eg. Plugin - Conditional Menu
Still, more suggestions are welcome on how can I do it without using a plugin.
Thank you
Hello i need to make a small menu like this
When i press the menu item, differend text is shown. I am new on wordpress and html. Could somebody explai how to do that ? Maybe there is plugins ?
Follow this tutorial from Codex. This guide covers the basic tasks a user may carry out when using the built-in menu editor.
http://codex.wordpress.org/WordPress_Menu_User_Guide
I just started to work with drupal, I'm trying to create a drop down submenu from the main menu, however it doesn't show up. Not because I misconfigured something (I think).
Can anybody tell me why this is the case?
I'm using the Bootstrap theme, i also tried others.
I have checked "Show as expanded" for parent menu item in main menu also.
Thanks,
Hi This can be done using nice menu irrespective of the theme used.
The nice menu module by default creates some blocks in Drupal. You just have to edit the block called nice menu 1 & configure it & display in a specific region of the theme.
I didn't use Bootstrap, and is very hard give you an answer without see what you have in your site, but maybe Nice Menus can be your solution.
hi to all
i am using wordpress for my site i wanna add accordian menu as a middle content of the index page how it possible plz help.
thanks in advance
Search for a plugin or widget.
If you can find a widget, search for how to make a extra widgetized area. Great tutorials and plugins are all over the web.
If you want further flexibility and you're familiar with code, search for jquery or javascript plugins. They'll give you the code and docs for implementation, and you can put it in your theme files, probably one of your page templates.
My Drupal is displaying a simple custom view, with a nodelist.
The trick is that my view displays comments under nodes in the list.
That is too much for one page and I need to get a list of pure nodes and hide comments under ReadMore link.
I've tried to play with comments settings for my the custom node type I am displaying,
but even if I choose "Display on separate page" - the comments themselves still remain in the main grid.
How to I move comments under ReadMore link to make them invisible in the grid?
Ahh the joys of theming views.
View Theming guide
This guide should be enough to get you started.
I'd recommend using the views-view-VIEWNAME-field.tpl.php as opposed to writing a theme function.
Hope this helps