Use MageBridge with Advanced Module Manager - Yireo

Use MageBridge with Advanced Module Manager

Assigning Joomla! modules to certain pages is done by selecting Menu-Items. But within your MageBridge shop, there are various pages that are not bound to a specific Menu-Item. With Joomla! it might be therefor troublesome to assign Joomla! modules using the Joomla! core functionality. While MageBridge offers some of its own features to deal with, you might also consider NoNumber Advanced Module Manager, which is explained in this tutorial.

Built-in MageBridge features

With MageBridge, you already have some more power over your module-assignment, then with the default Joomla! core: You can assign modules to pages, and then use the MageBridge option Hide positions to clean out that position on certain pages. You can also use the MageBridgeTemplateHelper class to add extra logic to your Joomla! template - but you will need to write your own PHP-code to make this possible.

... or use NoNumber Advanced Module Manager

Instead you might also consider the NoNumber Advanced Module Manager, which allows you to finetune which module should appear on which exact page. First of all, the Advanced Module Manager allows you to assign modules to Menu-Items - just like the Joomla! core does - but it also allows you to select the pages where the module should NOT appear. Even cooler: It also allows you to select a Menu-Item plus all of its child items - very useful if you have large hierarchy-trees in your menus.

mb_nn_advancedmodulemanager0

Assigning modules to certain MageBridge pages

Within the Advanced Module Manager, you can also assign a module to a certain component. For instance, you can make sure modules only appear when the MageBridge component is being called.

mb_nn_advancedmodulemanager2

It's also possible to assign a module to individual pages, using the URL scheme. Non-SEF URLs are a bit harder to use with MageBridge - mainly because MageBridge requires SEF to be enabled, and because non-SEF URLs can be quite length with MageBridge. Instead, just add your selected pages using SEF URLs. In the screenshot below, you can see that the MageBridge Root Menu-Item has an URL shop and by putting the original Magento URL (like customer/account) behind it, you can access any Magento URL possible. 

mb_nn_advancedmodulemanager1

Using the MageBridgeTemplateHelper class

Last but not least, you can also use your own PHP-code to determine whether a module should appear or not. While you could add your own custom PHP-code, you can also use the MageBridgeTemplateHelper class to determine things for you. This class is able to check for various handy things:

  • Whether the current page is either a sales-page, or a checkout-page, or a product-page, or a category-page (etcetera)
  • Whether the Prototype library has been loaded
  • Whether the current Magento layout has a left-column or right-column
  • Check for a specific Magento product-ID or a specific Magento category-ID

mb_nn_advancedmodulemanager3

Created on Thursday, 14 April 2011
Modified on Monday, 30 May 2011

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo