Promoting your RSS feed on your Drupal site
On the Adding a Feedburner RSS link to your theme post, Christina commented with questions about promoting an RSS feed on a Drupal site. There are several ways to do this, so it can be hard to identify the best one at first glance. Here are her questions:
- It seems that I can add an RSS feed icon to my blog in a few different ways and I am confused which way to go. I can toggle the RSS feed icon in my Omega subtheme via the "Toggle Advanced Elements." I can also add a feed icon via the Panel page. Then to make matters more confusing, I can add a feed in Views... How do you recommend I add the blog RSS feed to my blog page given all of these options I just mentioned?
- Also, how do I add the link next to the RSS feed icon that says, "Subscribe to this feed" similar to yours. I don't want just the default orange feed icon sitting on the bottom of my page. I want it to look like yours and have a link next to it that says "Subscribe to this blog"
- How do I move the RSS feed icon somewhere else on my page? Can I do this through CSS alone or do I have to mess with the tpl.php files?
- Finally, how do I add my RSS feed to the feedburner that you mentioned above? Do you think you could give more detailed instructions.
The Nuts and Bolts
There are two steps to making RSS a feature of your Drupal site. The first is creating or finding the feed, and the second is promoting it. There are several methods for each of these, so here's a quick overview before we get into which is better.
There are three main types of feeds in Drupal:
- Default rss.xml feed. This contains everything with "Promoted to front page" checked in the Publishing options on the node. It is included by default with Drupal and is always available unless you use a module like RSS Permissions to disable it or restrict access to it.
- Default taxonomy-based feeds. Feeds at taxonomy/term/[term ID]/feed contain all published content tagged with the term. These feed paths can be made prettier with the Sub-pathauto module, which will extend the SEO-friendly path of the tag -- like topics/drupal -- to its feed too, so you can access it at topics/drupal/feed.
- View-based feeds. Unlike the feeds above, these have to be intentionally created through the Views UI. There are a few views with feeds that come with the Views module, and if you enable them, their feeds will be enabled too. If you have specific requirements for your feed -- like showing content from only a few content types -- creating a tailored view is the way to go.
In the settings of some themes, like Omega, you can toggle the display of feed icons for the first two feeds. When you do, these icons will display in a fairly unobtrusive location. For example, by default in Omega, the feeds icon is displayed at the bottom left of the page, just above the footer.
If you want to encourage people to use your feeds, this option isn't a great one. Also, rather than giving people a link to different feeds on different pages, you may want to focus their attention on one useful feed (or several useful feeds, if you're feeling ambitious). To get more fine-tuned control, I recommend turning off the feed icons option in the theme and displaying your feed link in a block instead. You can do this by noting the URL, adding an RSS icon to your theme, and coding it the way you would any other HTML and CSS. Here's my code:
HTML (in block)
<a href="http://feeds.feedburner.com/webbykat" class="icon">Subscribe to RSS feed</a>
CSS
.rss a.icon {
background: url('/misc/feed.png') no-repeat left top;
padding-left: 1.5em;
}
You can add the .rss class to the block with Block Class or preprocessing; of course, you could also wrap the link in <div class="rss"> as well or add the .rss directly to the link.
Now that your link is in a block, you can use the Structure > Blocks menu to move it wherever you'd like without messing with tpls.
Finally, for a nice writeup about using Feedburner, check out this tutorial from Blogging Basics 101.
Hope this helps!