Dropdown Menu Under Account Menu - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Dropdown Menu Under Account Menu

A

Addington

Template 4 years ago

I would like to add to the account menu options as they appear on the right of the megamenu in desktop. The aim is for a series of options to appear in the drop-down menu after a user logs in (in the same way that you have various options on the account menu in Joomshaper.com)

When i try to modify menu.php, even just duplicating the link to the user profile, the site crashes.

Please could you tell me where to modify this menu?

(I asked once before and the reply was to modify the off-canvas menu but I think my question must have been misunderstood as I am talking about the options that appear on the desktop menu).

Thanks, in advance for your help.

0
7 Answers
Pavel
Pavel
Accepted Answer
4 years ago #35857

Hi. You can add a module position there by first creating it in templateDetails.xml. And use in this position a standard menu module with access for registered users. The additional CSS code will also need.

But all changes in menu.php will be erased after updating the template. If you are ready for this, then try. You need to add this line of code with your module position name.

1
A
Addington
Accepted Answer
4 years ago #35841

This is what I have versus what I am trying to achieve. Can you help?

<link removed>

0
Anne
Anne
Accepted Answer
Support Agent 4 years ago #35948

Hello Charles Southgate

Thanks for contacting with us. You can follow Pavel's instruction. And @Pavel thanks for the details explanation.

-Regards

0
A
Addington
Accepted Answer
4 years ago #35982

It works! Thank you Pavel.

If anyone is reading this looking to do the same thing and wondering how to get the CSS to look like the rest of the drop down menu, you need to change the style="none" to style="html5" in the extra line in the menu.php.

Then you need to go to the module and add " nav" as a menu class suffix under the Advanced tab.

0
Pavel
Pavel
Accepted Answer
4 years ago #35986

You are wellcome

you need to change the style="none" to style="html5" in the extra line

It is default, so it is better not to change in the extra line. It can also be selected in the module settings.

1
A
Addington
Accepted Answer
4 years ago #36004

Thank you again, Pavel.

I have changed it back to none as you suggest.

I am trying to work out now how to make the drop down box wider and get it all into a column rather tha flex-wrap. Any suggestions?

0
Pavel
Pavel
Accepted Answer
4 years ago #36012

For example, a similar CSS code

.sp-profile-dropdown {
    width: 300px;
}
.sp-profile-dropdown .menu.nav {
    display: flex;
    flex-direction: column;
}

Or like this (instead flex properties), that there is less code

.sp-profile-dropdown .menu.nav {
    display: grid;
}
0