Using the MageBridge Content Plugin
Within the Joomla! architecture, Content Plugins allow you to modify articles or other types of content just before the content is sent back to the browser. The MageBridge Content Plugin uses this functionality but instead of changing the content itself, it makes Magento responsible for changing the content.
Bridging Magento content-filters
Many third party plugins within Joomla! allow you to add things to an article by adding specific tags to this article. Magento offers the same functionality, which is for instance shown in the Magento example data when visiting the CMS Pages. Within these CMS Pages, special tags can be placed - sometimes called CMS tags or markup tags. They look like the following:
{{block type="cms/block" block_id="foobar"}}
When the content is actually displayed, this markup tag is replaced with the HTML-output of a specific block. In this case, the block is a CMS Block with ID "foobar". The Magento markup tags allow you to easily insert Magento blocks in content, but there are more options as well.

The MageBridge Content Plugin allows you to send content through the bridge from Joomla! to Magento, where the content is parsed by these Magento content-filters. All Magento markup tags will be replaced and the result is send back to Joomla!. In short, the same tricks that are possible inside CMS Pages can now also be applied to Joomla! content.
What is content?
Parse Magento content with Joomla! logic, or Joomla! content with Magento logic?
The MageBridge Content Plugin allows you to parse content through Magento, but what is content? Joomla! is best known for its management of articles, so articles are the best example of content. But weblinks, contact-information, forum-threads and even modules can also be seen as content.
To complicate things, MageBridge ships with an option called Enable Content Plugins. This option is not the same thing as the actual MageBridge Content Plugin. The MageBridge Content Plugin allows you to parse Joomla! content through Magento content-plugins, but the option Enable Content Plugins allows you to apply Joomla! Content Plugins to Magento blocks.
Examples of markup tags
Markup tags are part of Magento, so it is not the task of MageBridge to document all possibilities. The Magento wikipage Markup Tags contains the official documentation. But here are some ideas anyway.
The following code calls upon the Magento Catalog-module and within this module the PHP-class Mage_Catalog_Block_Product_New which generates a list of newest products.
{{block type="catalog/product_new" template="catalog/product/new.phtml"}}
Another example shows you a listing of a category with ID 16:
{{block type="catalog/product_list" category_id="16" template="catalog/product/list.phtml"}}
Instead of using some pre-defined block, you could also use the type "core/template" to create your own specific PHTML-template, which could contain the Magento code you want:
{{block type="core/template" template="custom/my-template.phtml"}}
Creating links
Besides blocks, the Magento markup tags allow you to do other things as well. For instance the following tag refers to a specific image within the Magento skin:
{{skin url="images/media/example.png"}}
And here's a link to add a Magento product with ID 3 to the shopping cart:
{{store url=checkout/cart/add?product=3}}
Or you could also easily refer to a specific MageBridge page:
{{store url="customer/account"}}
However, if you want to create links to other MageBridge pages, there is an easier way to do this which does not require the MageBridge Content Plugin:
index.php?option=com_magebridge&view=root&request=customer/account
Our Yireo Tutorials also include non-MageBridge topics for including Magento markup tags to get specific results in your CMS pages. All these tricks also apply to Joomla! content when using the MageBridge Content Plugin.
Created on Sunday, 29 November 2009Modified on Friday, 11 March 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
