NOTE: This "How-to" only applies to Joomla! 1.0. It does not apply to Joomla! 1.5.
RSS in Joomla! 1.0.x
Most of this article will discuss RSS in Joomla! 1.0.x. To syndicate your content in Joomla!, you need to know about two core extensions: com_syndicate and mod_rssfeed.
com_syndicate
The component that generates the RSS feeds for your website is called com_syndicate. You can configure your syndication settings by clicking "Components->Syndicate" in your Joomla! administrator panel.
On the next screen, you will see a list of parameters that you can set for your content syndication. Here is a list of the parameters, along with a description of what each does.
- Security Check: If you set "Security Check" to yes, you can control whether or not your syndication feed is published by publishing or unpublishing the module mod_rssfeed.
- Cache: This paramter determines whether or not your syndication feed will be cached, which means that the server does not have to generate the feed every time it is accessed. Instead, it will pull the feed from the cached version, and refresh at a pre-determined time interval which you set in the "Cache Time" parameter.
- Cache Time: This is the pre-determined interval at which the cache is refreshed.
- # Items: This is the number of content items that will be in your feed.
- Title: This is the title of your feed. I usually just put the title of my website, but you can make this whatever you want it to be.
- Descirption: This is just a brief description of your RSS feed.
- Image: With this, you have the option of having an image linked to your RSS feed.
- Image Alt: This is the alternate text that will go along with your image.
- Limit Text: With this parameter and the "Text Length" parameter, you have the option of limiting how much text is fed from each content item.
- Text Length: This is the length (in number of words) that the feed for each content item will be if you choose to limit it.
- Order: With this, you can set what your content items are ordered by in your feed. The most logical choice is "Most recent first", because people who subscribe to your feed will want to see teh most recent items first.
- Live Bookmarks: With this, you can enable support for Firefox Live Bookmarks.
Once you have set your parameters in com_syndicate, it is time to set up mod_rssfeed.
mod_rssfeed
The module for content syndication is mod_rssfeed. This module displays a link to your feed in your choice of 5 different formats: RSS 0.91, RSS 1.0, RSS 2.0, Atom, and OPML. You can choose any combination of the 5 formats to display. I usually just pick one, and I'll explain why in a later section.
Before you use mod_rssfeed, you will need to configure it. Here's how you do it:
- In your Joomla! administrator panel, click Modules->Site Modules to access the Module Manager.
- In the list of site modules, find the one with the Type of mod_rssfeed. It is probably the one with the Module Name of Syndicate.
- Click on the module name ("Syndicate") to open up the Module Editor for mod_rssfeed.
- Beneath the "Module Details", you will see "Parameters". Here is a list of the parameters and what each one does.
- Text: This is text that you can display in the module along with the links.
- Enable Cache: This tells Joomla! whether or not to cache the content of the module. If you do not understand what this is for, you can just keep it set to "No".
- Module Class Suffix: By putting a value here, you can add a suffix to the CSS class for this module. You should only do this if your template will apply a different style based on the module class.
- RSS 0.91: This parameter is used to show or hide the RSS 0.91 link.
- RSS 1.0: This parameter is used to show or hide the RSS 1.0 link.
- RSS 2.0: This parameter is used to show or hide the RSS 2.0 link.
- Atom: This parameter is used to show or hide the Atom link.
- OPML: This parameter is used to show or hide the OPML link.
- RSS 0.91 Image: With this parameter, you can choose which image to display for your RSS 0.91 link. It gives you a drop-down list of images to choose from, and it pulls those images from your "images/M_images" directory in your Joomla! installation. If you do not see an image in that directory that you want to use, you can use the media manager to upload an image of your choosing. It will automatically be added to the list of images to choose from.
- RSS 1.0 Image: Same as RSS 0.91 Image parameter.
- RSS 2.0 Image: Same as RSS 0.91 Image parameter.
- Atom Image: Same as RSS 0.91 Image parameter.
- OPML Image: Same as RSS 0.91 Image parameter.
Once you have set your mod_rssfeed parameters, you will want to publish it to a module position of your choice. If you have done this successfully, you now have a published syndication feed for your website. Be sure and go to your home page, and make sure that your Syndicate module is published and visible to your site's visitors.
Drawback in com_syndicate for Joomla! 1.0.x
The biggest drawback for com_syndicate in Joomla! 1.0.x is that it only syndicates items published to the frontpage. If you wanted to have separate feeds for separate categories, you could not do that with the core syndication component.
Other options
The good news is, there are options around this drawback. Joomla! is a highly extensible application, which means you can either create your own syndication component or use one of the third-party syndication components available for Joomla! Click here for a list of RSS extensions for Joomla! in the Extensions Directory. You want to get a syndication extension and not an RSS reader extension.
More good news: Joomla! 1.5
With Joomla! 1.5, the syndication functionality has gotten a much-needed overhaul. You can syndicate content for any section or category you want, and you can even syndicate content from there components. For example, you could provide an RSS feed of the contacts in your contacts component.
When I have had more time to play with it and understand it, I will post another article on how to use the syndication functionality in Joomla! 1.5.
Advanced Techniques
The syndication component is pretty limited in what it can do for you as a webmaster. Luckily, there are several feed services available the provided extended functionality for your RSS feed. For HowToJoomla!, I am using a service called FeedBurner. With this service, I have several tools at my disposal. Among other things, I can track the number of subscribers to my RSS feed, and I can give visitors the option to receive automatic e-mail updates when my RSS feed is updated. Pretty cool, huh?
I mentioned earlier that I typically only use one of the feed choices (RSS 2.0) available in com_syndicate. That is because FeedBurner only needs one link to your feed, and the format you use is really not that important if you are using FeedBurner.
Here's how you use FeedBurner:
- Sign up for an account at FeedBurner.com. A basic account is free, and you can upgrade to advanced features for a fee.
- On your Joomla! site, get a link to the RSS feed that com_syndicate generates. The links will look something like this:
your_joomla_directory/index.php?option=com_rss&feed=RSS2.0&no_html=1
- FeedBurner will ask your for a link to your RSS feed. Use the link you got in the previous step.
- FeedBurner will give you a new link to use as your RSS feed. The link to the HowToJoomla feed is http://feeds.feedburner.com/howtojoomla.
- You will now want to hide mod_rssfeed, and create a new module that displays a link to your FeedBurner feed. The best way to hide mod_rssfeed is to publish it to a module position that your template does not use. That way, you can keep the module published, but it will not display on the front end of your site. To create a new module, just go to your module manager and click "New". Then, enter your link just like you would enter content, and click "Save".
Another benefit to using a service like FeedBurner is that you can change the location of your RSS feed (for example, if you decide to use a third-party syndication extension), and your visitors will not have to re-subscribe to your feed. You would just need to change your link information through your FeedBurner account. Your visitors will never know the difference, because the link they see (http://feeds.feedburner.com/yourfeedname) stays the same.
Once you make sure that your FeedBurner link module is displaying on the front end just like you want it, you are now set. Your visitors can now subscribe to your RSS feed via Feedburner.
Thanks for the suggestion!
Thanks to Craig Watkins from IllustratorTips.com for suggesting RSS feeds in Joomla! as a "How To" topic. If there is a feature of Joomla! that you would like for me to discuss, please feel free to contact me and suggest the topic.
As always, please feel free to post any questions or comments.