When using Joomla! sometimes one requires to hide some information, like a specific menu, or an entire position.
MetaMod let’s you do this in a quite easy way. One can follow their documented technique of moving stuff from an non-existing position into the real position, or one can use a simpler strategy that does not imply having virtual positions and nor moving stuff between these virtual positions and the real position.
Imagine you wish to hide all position placeholders on a marketing landing page. It’s quite easy:
- Download and install MetMod. Don’t forget to read the documentation to know how MetaMod works.
- The first step is to define the MetaMod position in the last one to be interpreted by Joomla!, usually the footer or the debug.
- This guarantees that our code will be executed only when all positions are already loaded.
- The second step is to define the MetaMod execution rules, as stated in the documentation.
Here’s an example: let’s say that one wishes to hide the stuff on the left of the page (usually the menu, login, etc.) when the user is located in the Virtuemart Cart plugin.
Here’s what one has to do:
- Identify the location through the $option and $view parameter values.
- If required, adjust the size of the remaining position in order to claim the extra space.
- Return the current position.
elem = document.getElementById('column_left');
elem = document.getElementById('content_wrap');
Obviously this must be adapted to the template in use and it may required some adjustments, like the new size of the position that should claim the extra space.
One can use Firebug to help finding the HTML div elements identifiers involved.