Collapse Off canvas Menu by default - click to open child items from parent menu - Forum | JoomShaper
Staff replied SP Page Builder

Collapse Off canvas Menu by default - click to open child items from parent menu

Asked by Roger 4 years ago Last activity 4 years ago

Hello

How do we 'Collapse Off canvas Menu by default' - requiring you to click + to open child items from parent menu?

I do not want sub menu items to show untill + is expanded

https://ibb.co/CnZMymB

Thank you

7 replies

Ariba Staff

Hello

Thank you for your query.

Please check the screenshot below. If you remove the highlighted css rules, you will get the arrow (which is used to expand child menu items).
Capture001.JPG

Roger Asked this

Hello,

Yes that expands fully my main menu and the sub-menu (child) items. What I want is for the main items to be expanded but the sub-menu items to have the arrow/ plus symbol so user has to click to expand and show them.

Eg 'Laptop Repair' showing

but have to click to show any sub pages within 'laptop Repair'

https://ibb.co/qDk87Br

Rashida Rahman Staff

Hi there!

I have checked and the submenus are set as hidden as I can see.

https://prnt.sc/7H5evzfU4CWm

So, would you please clarify, which items do you want to show?

Best Regards

Roger Asked this

hello

Ariba gave ne custom css to exoand all menus. For now i have hidden as i do not want sub menus to show all the time as untidy.

i would like main menu items to show. when you click on '>' then sub menu items expand and open.

please look at Joomshaper homepage menu items, this is how i want mine

Rashida Rahman Staff

Hi,

Is this what you want?

https://prnt.sc/6kFTWMcDwR8H

https://prnt.sc/5k5Xka-jv6r5

Please take my apology, as I think I could not get you well...

However, you have keep all your menu items under a single menu. So it requires the following custom code to make the first or main menu item collapse but the second childs to remain closed:

body.ltr .offcanvas-menu .offcanvas-inner ul.menu>li.menu-parent>a>.menu-toggler{
display: none;
}
body.ltr .offcanvas-menu .offcanvas-inner ul.menu>li>ul {
    display: block;
}

I have added it in your custom CSS. Please check and let me know if it is okay now!
https://prnt.sc/KAJwJyGnmOyz

https://prnt.sc/VNX2tHs78QyT

Best Regards.

Roger Asked this

Hello Rashida,

We have nearly solved the issue.

when you select offcanvas menu can it be set so it by default shows :

Homepage
PC Repair >
Laptop Repair>
Remote Support
....etc

with your edit when you open off canvas menu it shows:

Homepage >

Does that make sense i want to click off canvas and it shows all the main pages and have to > to open sub pages

Rashida Rahman Staff

Hi there!

It is looking good at my end.

Here is what I can see from first sight: https://prnt.sc/JxcwPruXgPjt

Please clear your Joomla and browser cache deeply and check again.

Best Regards

Log in to reply.