Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to activate dropdown menu #21

Open
Taatshi opened this issue Jun 8, 2018 · 9 comments
Open

How to activate dropdown menu #21

Taatshi opened this issue Jun 8, 2018 · 9 comments

Comments

@Taatshi
Copy link

Taatshi commented Jun 8, 2018

Hello.

I create a menu with sub-items. The parent menu item is a link. It has sub-clauses. When I click next to the parent menu item, I goes to the new page, and the sub-items do not fall out. How do I make the link active and the drop-down submenu active at the same time?

@jwiesel
Copy link
Contributor

jwiesel commented Oct 25, 2018

Hi @Taatshi ,
thank you for your question. To my knowlege bootstrap does not support nested dropdowns out of the box. Hence this is not supported right now by this template as it shipps with Bootstrap "vanilla".
See also:

However, if it is supported by bootstrap and I missed that, we can add this functionality to the template as well.

@gunnar-g
Copy link

gunnar-g commented May 17, 2019

I honestly think he's talking about a 2 layer menu. This is supported with navbar. https://getbootstrap.com/docs/4.0/components/navbar/
It does not work with this template though. The element generated misses data-toggle="dropdown"
Dropdown

@gunnar-g
Copy link

gunnar-g commented Jun 1, 2019

I found the issue, in mod_menu/default.php at line 91 I changed the line
require JModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type);
in
require JModuleHelper::getLayoutPath('mod_menu', 'default_component');
as in my case the type is url, and default_url.php does not exist

@N6REJ
Copy link

N6REJ commented Jan 2, 2020

seems this is now an abandoned project? Carets don't work either. Seems like only part of the menu overides were completed.

@N6REJ
Copy link

N6REJ commented Jan 2, 2020

@gunnar-g did you get the menu working properly?

@jwiesel
Copy link
Contributor

jwiesel commented Jan 3, 2020

Hi @Taatshi , @gunnar-g , @N6REJ ,
sorry for the awefully late response.
I didn't work on Joomla! projects for quite a while.

I just read the comments again to understand the issue you are facing.
Regarding 2-level menus: As gunnar-g pointed out, Bootstrap offers Navbars with dropdowns. You can achieve this with this template with the following steps:

  • In the module settings of your menu module go to "Advanced"
  • Add a "Menu Class Suffix" with value " navbar-nav". Important: There has to be a blank in front of the "n", otherwise the suffix will not be seen as a separate CSS class

However until now this did not work with parent menu entries of type URL. Therefore gunnar-g's override in default.php helped as a workaround.

I just added the missing default_url.php to the template. If you add the file to your template or zip the latest sources from github to install a new template version, it should work.

@N6REJ
Copy link

N6REJ commented Jan 3, 2020

@jwiesel where would you put the ^ for dropdowns?

@N6REJ
Copy link

N6REJ commented Jan 3, 2020

@jwiesel as much as I hate to say it this doesn't work.
#1

<ul class="menu<?php echo $class_sfx;?>"<?php
was changed and breaks the site in many ways. Causes extremely long load times and looks like an unordered list.

#2 dropdowns still don't exist. there is no caret, and no dropdown behavior.
I'm going to rollback my project and implement your changes 1v1 till I can find the breaking point aside from line 15.

@N6REJ
Copy link

N6REJ commented Jan 3, 2020

@jwiesel ignore what I said about it not working. It does now. 2nd level dropdowns don't FULLY and I KNOW it can be done but I'm not sure what the process is. Not crazy about the styling but thats not really your issue.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants