Unpublish a menu

59 views
Skip to first unread message

David Calvete

unread,
May 5, 2017, 10:02:02 AM5/5/17
to Joomla! CMS Development
Is there a way to unpublish a menu ?

I think not as I never encountered any option allowing that in Joomla...

I also tested Joomla 4.x in dev mode and I saw nothing new about this point...

So wouldn't it be nice to be able to unpublish a menu ?

I mean, almost everything in Joomla can be published or unpublished an even be send to trash except the menus...

And I speak about the menus, not about menu module (mod_menu) or menu elements... no a whole menu that you don't need for a specific purpose...

So, unpublishing it and he will be invisible fore everybody in the drop down menu when you click on the Menu section in the backend...

He will also be invisible in the select to choose a menu when creating a menu element or in the tab of a module to asign a module to a page...

Best regards,
David Calvete

brian teeman

unread,
May 5, 2017, 12:43:08 PM5/5/17
to Joomla! CMS Development
What is the usecase for wanting this - I dont see why you would ever want this

Webdongle Elgnodbew

unread,
May 5, 2017, 6:16:21 PM5/5/17
to Joomla! CMS Development
That is a question for the forums but the short answer is ... a menu is (in affect) unpublished until a menu item is assigned to it.  In future please confine support questions to https://forum.joomla.org/.  hank you

Webdongle Elgnodbew

unread,
May 5, 2017, 6:23:05 PM5/5/17
to Joomla! CMS Development
Addendum

"until a menu item is assigned to it"
should have read
until a Module is associated with it

brian teeman

unread,
May 6, 2017, 4:50:02 AM5/6/17
to Joomla! CMS Development
Kevin if you read the original post that is not what David is referring to.

He specifically stated that it was not to do with a module .Even without a module the menu is displayed in the admin in various places such as the module and template assignments. What he is asking for is for a way to have a menu created but for it to be completely unpublished and not displayed in such places.

My question to David is still what is the use case for creating a menu and not using it at all.


David Calvete

unread,
May 6, 2017, 7:52:26 AM5/6/17
to Joomla! CMS Development
Hi Brian,

Well the use case is simple when you use Joomla in a intensive production flow...

Example :
I develop a lot of websites based on the same initial configuration... So to save time I have a basic pre-configured installation that I replicate for each new client that choose a certain kind of website.

This the base has a lot of options and also a default multilingual configuration (I live in Belgium so it is needed but it could be the case for a lot of people living in Canada, Switzerland and other countries where many different languages are speaked depending the part of the country they live).

Then I adapt the configuration depending on the options they chose (I can remove modules, a blog or even a language if they don't need it).
When I dot this I unpublish the elements they don't need and put them in the trash (I never completely delete them because clients are so mind changing that if I delete something you can be sure that the next day they will ask me to put it back).

Based on that experience and the kind of use I do with Joomla, I'm facing the problem that even if a disable a language, the menu I created for it is still visible everywhere in the admin... It is the same problem for a sub menu for a blog or any king of menu you can create and for any kind of reason you don't need for a certain time..

So my clients can always see things that are not "activated" in their websites and they can make mistakes too when linking a module to a page if menus not in use are still visible...

Well that's it for the example...

I'm pretty sure many people would find usefulness of this upgrade... think about people adapting their websites for events or temporal functionalities... be able to unpublish a menu for a certain time can be usefull..

brian teeman

unread,
May 6, 2017, 9:48:55 AM5/6/17
to Joomla! CMS Development
Thanks for the explanation - I am not going to comment on if I think your workflow is a good idea or not

So the simple answer to your original question - Is there a way to unpublish a menu ?

Is no it is not possible as the database table for menutypes does not have a state field

Even if it was added then we would need to change the code everywhere that is listing the menu to check to see if the menu is published or not.  That's quite a lot of work for someone to do and would probably not be backwards compatible with any extension that also lists the menu items. For this edge case of yours I personally dont see that someone will do the work but of course if you do and submit the changes then they will be reviewed and tested

Reply all
Reply to author
Forward
0 new messages