Advertisement

Publish and Unpublish Sidebar Module from the Front End

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
User avatar
adricist
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Sep 17, 2008 11:39 am

Publish and Unpublish Sidebar Module from the Front End

Post by adricist » Sun Dec 08, 2024 11:42 pm

Hi,

We have a Menu that is displayed in the Sidebar Left and another Menu that is displayed in the Top Menu position.

Is there a way to have a menu item in the Top Menu position that would allow the user to display or hide the Sidebar Menu?

It basically would be either one or two menu items that would allow to set the Sidebar Module to be Published or Unpublished for that particular user only!

Is this possible?

Thank you in advance for your help.

Regards,
Adri

Advertisement
User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31516
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Publish and Unpublish Sidebar Module from the Front End

Post by Per Yngve Berg » Mon Dec 09, 2024 8:40 am

Can't you just make a sub-menu?

https://docs.joomla.org/split_menus

User avatar
adricist
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Sep 17, 2008 11:39 am

Re: Publish and Unpublish Sidebar Module from the Front End

Post by adricist » Mon Dec 09, 2024 10:53 am

Per Yngve Berg wrote: Mon Dec 09, 2024 8:40 am Can't you just make a sub-menu?

https://docs.joomla.org/split_menus
No Per. What we need is the ability to recover the Sidebar width, so that more width of the browser window becomes available for the article.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31516
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Publish and Unpublish Sidebar Module from the Front End

Post by Per Yngve Berg » Mon Dec 09, 2024 11:52 am

The children will only show when the parent is active.

Did you read the docs on how to create a split Menu?

User avatar
adricist
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Sep 17, 2008 11:39 am

Re: Publish and Unpublish Sidebar Module from the Front End

Post by adricist » Mon Dec 09, 2024 12:06 pm

Per Yngve Berg wrote: Mon Dec 09, 2024 11:52 am The children will only show when the parent is active.

Did you read the docs on how to create a split Menu?
Per, are you suggesting that I should create a Parent without Children? And use that as an option to hide the Sidebar Menu?

If so, I still think that the Sidebar position would still be active, but only displaying an empty container. This would not release the space taken by the Sidebar position.

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2965
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Publish and Unpublish Sidebar Module from the Front End

Post by ceford » Mon Dec 09, 2024 12:10 pm

You could put a button in the top position to toggle visibility of the sidebar. That would work like the Atum admin menu except that you could make the sidebar disappear/reappear completely. It would require some coding. Perhaps a menu module override?

gws
Joomla! Champion
Joomla! Champion
Posts: 6532
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Publish and Unpublish Sidebar Module from the Front End

Post by gws » Mon Dec 09, 2024 12:37 pm

Could you create a child template without anything in the sidebar and assign this to the page you don't want the module on.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31516
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Publish and Unpublish Sidebar Module from the Front End

Post by Per Yngve Berg » Tue Dec 10, 2024 5:23 am

1) Create a new Menu Item in Mai Menu

2) Move all Items from Sidebar Menu to Mai Menu and set them as Children

3) Edit Sidebar Module to show Mainmenu.

4) Set Start and End Levels on Sidebar Module.

User avatar
adricist
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Sep 17, 2008 11:39 am

Re: Publish and Unpublish Sidebar Module from the Front End

Post by adricist » Tue Dec 10, 2024 6:05 am

ceford wrote: Mon Dec 09, 2024 12:10 pm You could put a button in the top position to toggle visibility of the sidebar. That would work like the Atum admin menu except that you could make the sidebar disappear/reappear completely. It would require some coding. Perhaps a menu module override?
Would this work just for that user? Or would it apply to all users? I need this to only disappear for that user, not everyone.

User avatar
adricist
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Sep 17, 2008 11:39 am

Re: Publish and Unpublish Sidebar Module from the Front End

Post by adricist » Tue Dec 10, 2024 6:06 am

Per Yngve Berg wrote: Tue Dec 10, 2024 5:23 am 1) Create a new Menu Item in Mai Menu

2) Move all Items from Sidebar Menu to Mai Menu and set them as Children

3) Edit Sidebar Module to show Mainmenu.

4) Set Start and End Levels on Sidebar Module.
Thank you Per and everyone for your suggestions. I will try and setup a demo site so that it becomes easier to explain what I am trying to achieve.

Advertisement

Post Reply

Return to “General Questions/New to Joomla! 4.x”