Configuring the MageBridge Root Menu-Item
Within the Joomla! Menu Manager it is possible to create numerous Menu-Items pointing to various pages. With a MageBridge-based webshop, we advise you to create one special Menu-Item pointing to the MageBridge Root - this is the so-called MageBridge Root Menu-Item. This tutorial explains why and how to create this Menu-Item.
What is the MageBridge Root Menu-Item?
With Joomla!, you can create Menu-Items and these Menu-Items are pointing to specific pages. Every page is actually served by a specific component, and because MageBridge is also just a Joomla! component, you can point a Menu-Item therefor to the MageBridge component. Within the MageBridge component, there are various pages however: Product-pages, category-pages, checkout-pages, basically every Magento page you can think of.
Two homepages inside one webapplication
Because every Magento page is also accessible through the MageBridge component, this creates a lot of possibilities. But when integrating two applications, you also need to consider the requirements of those applications. Every webapplication (like Joomla! and Magento) works with the concept of a default homepage. But when integrating Magento with Joomla!, you are left with two homepages: The Joomla! homepage and the Magento homepage.
Basically, when you point a Menu-Item to the MageBridge Root (and therefor creating a MageBridge Root Menu-Item), that Menu-Item is pointing to the Magento homepage. In other words, the MageBridge Root Menu-Item equals the Magento homepage.
The benefits of a MageBridge Root Menu-Item
But why should you add a second homepage? The reason is simple: Within Magento, the homepage takes in a special place: The homepage has an empty path, so is used as base URL for other URLs. For instance, if Magento is available under http://MAGENTO/ then that URL is also the URL of the homepage. If you want to have the cart-URL, you would just append /checkout/cart to the homepage URL: http://MAGENTO/checkout/cart.
The same applies to MageBridge: For instance, if the MageBridge Root Menu-Item has an URL http://JOOMLA/shop/ (because shop is the alias for the MageBridge Root Menu-Item), then http://JOOMLA/shop/checkout/cart will refer to the cart-URL. You can see that it is important that any Magento page can be accessed by appending the URL-segment to the homepage URL.
Duplicate pages
But if there is no homepage at all, then MageBridge needs to behave differently. Therefor, at that moment that a specific Magento homepage is missing, the current Menu-Item will be used to add the Magento URLs to. For instance, if you have a Menu-Item pointing to a MageBridge product-page http://JOOMLA/my-product-1, then the checkout will be available under http://JOOMLA/my-product-1/checkout/cart. But if you have another product-page http://JOOMLA/my-product-2, then the checkout will also be available under http://JOOMLA/my-product-2/checkout/cart.
You can see the problem: The more Menu-Items you create, the more duplicate pages you will generate - something that might downgrade your SEO. Therefor, when you want to have the best SEO-abilities, it's best to use a MageBridge Root Menu-Item.
Creating the MageBridge Root Menu-Item
To create a MageBridge Root Menu-Item, browse within your Joomla! backend to the Menu Manager and create a new Menu-Item within the menu of your choice. As type, choose MageBridge Root. You're done. There are no further settings to deal with. Note that the parameter Magento Store is really something that you should only play with if you're a MageBridge expert - perhaps you should forget it even exists.

Make sure to choose an Alias for this Menu-Item that gives you good SEO. It will be prepended to most of your MageBridge URLs, so probably shop, store or products are good values here.
Settings in the MageBridge component
There are two settings on the MageBridge Configuration page that deal with this MageBridge Root Menu-Item. The first is Use Root Menu-Item, which should be set to Yes. If you set this to No, this whole tutorial does not apply to your situation. The second is Enforce Root Menu-Item, which can be best set to No. Setting it to Yes will make sure that MageBridge will always use the base of the MageBridge Root URL (which is good to definitely get rid of any duplicate pages on your site), but it will always bypass the whole concept of Joomla! Page Assignment - meaning that you can no longer assign modules (or anything else) to a specific MageBridge pages: You will need to use custom programming instead. We therefor consider this an expert option.

Making the Magento homepage the Joomla! homepage
Something that you could decide on, is to set this MageBridge Root Menu-Item as the Default Menu-Item within Joomla! - in other words, you can make the MageBridge Root (the Magento homepage) your Joomla! homepage. Magento CMS Pages are a little bit harder to modify than Joomla! Articles, but it still might give you some benefits: There is only one homepage in the total system, and as a side-effect, the Alias-value that is normally prepended to all your MageBridge URLs is empty.
Note that you can add Joomla! plugin-code to your Magento CMS-pages - you can use this for instance to add Joomla! module-positions to your Magento homepage, just like you can with Joomla! articles.
Adding the MageBridge Root Menu-Item to a hidden menu
A more advanced trick is to create a Joomla! menu (which serves as a logical container for Menu-Items) that is not linked to a Joomla! module. The Joomla! architecture makes a difference between a menu and a module, and every time you want to display a menu on your Joomla! frontend, you will need a module to that for you. But if you do not create this module, the menu will be functional but just not visible - it's a hidden menu.
You could create a hidden menu and place the MageBridge Root Menu-Item in it. This means that none of your customers will have click on the Magento homepage. But your MageBridge URLs will still contain the Alias configured under the Menu-Item (for instance /shop/).
Created on Friday, 11 March 2011Modified on Monday, 29 August 2011
More tutorials in this section
- Setting the MageBridge URLs in Magento
- Disabling user synchronization in MageBridge
- Importing and exporting users
- Using the MageBridgeLinks/JCE-plugin
- Best practices with MageBridge
- Using MageBridge Product Connectors
- Migrating users between Joomla! and Magento
- Using MageBridge stores to load a different Magento theme
- Using the MageBridge Content Plugin
- MageBridge SEO Guide
- Removing MageBridge
- Step-by-step: Adding a custom Magento block
- Managing MageBridge extensions
- How to use URL-suffices with MageBridge?
- Step-by-step: Create a Magento API user
- Step-by-step: Activating MageBridge plugins
- Step-by-step: Creating a MageBridge Menu-Item
- API permissions with MageBridge
- Configuring payment methods in MageBridge
- Using MageBridge modules
- Authentication guide for MageBridge
- Working with MageBridge URL Replacements
- Handling Downloadable Products in MageBridge
- Handling file uploads in MageBridge
- Configuring the MageBridge Root Menu-Item
- Setting MageBridge offline through the database
- How Joomla! works with MageBridge URLs
- Migrating MageBridge from Joomla! 1.5 to Joomla! 2.5
- Using the MageBridge System Plugin
