A customer site utilizes a Joomla template with a lot of modules within the left column, as well as the custom component I am creating, individuals modules should be changed with a vertical menu. The hack solution I emerged with would be to hide individuals modules with CSS:

div#leftpad > div {
    display:none;
}

after which place a <div id='compmenu'> in <div id='leftpad'> with javascript and hang display:block. With jQuery, I possibly could do

jQuery('#compmenu').appendTo('#leftpad').show();

The component shows a google map, so javascript is needed anyway. Any Joomla experts here are conscious of a far more elegant or straightforward method to offer the same result?

Why not make use of the build in Menu-Bind for Modules to cover them whenever your Module or Component is displayed, this is a clean way. I believe your Module/Comp is certain to a Food selection.

Edit: Without a doubt the consumer need to implement your Module/Comp the proper way. It's very bad to behave such as this having a hack.

  • Create Menu-Item for the component (programtic)
  • Produce a hidden menu
  • Add your aspect of that menu
  • Do unbound all modules out of this menue

The Joomla API hold a great number of Lessons about building components. I been through them previously but when i see they've enhanced them. When I understand your component is comparatively easy therefore the default menu ought to be what you would like. It's referred to within the install XML

 <administration>
  <!-- Administration Menu Section -->
  <menu>MyMenuLink</menu>

  <!-- some other stuff -->

 </administration>

And will also be offered at the Joomla! menumanager after the consumer has installed your component. So It is going to be not too a hardship on you.

In Joomla, menu types are based on the different Sights per the installed components. In case your component is correctly coded to Joomla MVC standards, you ought to have a minumum of one View, which provides you with a minumum of one menu type to select from. As sra pointed out, even when you don't need a menu link, you need to produce a hidden menu so that you can produce a link so you've an itemID to utilize and assign modules to.

You will find a couple of extensions and websites that will help produce the necessary files for any component so all you want do is give a little code. Once you know the Joomla MVC almost all too hard.

http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1

Doing the work by doing this could save you lots of headache later once the consumer needs to learn how to make use of your component.