Can I create sub-menus für menus in sidebar?

Dominik L Posted in Technical Support 11 months ago

Hello!

I want to create sub-menus in the sidebar,is that possible?

For example: I don't want "groups" and "polls" in the sidebar, I want them in a sub-menu like "Community", so the user expands "community" and then he sees stuff like "groups" or "polls" and can alos expand them.

Is that possible? If yes, how can I archieve that?

Replies
German Dominik L Replied 11 months ago

I already figured it out using css, but I thought there is a way with PHP, because CSS and JS are always client-side

Indonesian Arsalan Shah Replied 11 months ago

if chatgpt would that smart enough it would have told us to do it using css :)

li.menu-section-groups,
li.menu-section-polls {
    display: none;
}
German Dominik L Replied 11 months ago

Thank you!

I got another qeustion

I am struggeling with the function ossn_unregister_menu_item

I try to get rid of the "groups" and "polls" menu, because I want to add them to another menu, as already mentioned,

I don't know really how to use ossn_unregister_menu_item, could you maybe explain that, please?

German Michael Zülsdorff Replied 11 months ago

You can find some example code here:
https://www.opensource-socialnetwork.org/component/view/1963/system-info
It implements a new main entry "System Info" and some sub-menu entries

For all available options study libraries/ossn.lib.menus.php

enter image description here