Choose Autodiscovery Feed Based on Page URL

Author: Webvanta

The autodiscovery link is how browsers know if there is an RSS feed available for a given page. This code can be included in the head section of the page to provide the blog RSS feed if the current page is within the blog system, or the main database feed otherwise.

Similar code can be used in the visual header of the page if it includes an RSS feed icon.

<w:if_url matches='blog|post'>  <!-- for blog pages, use the blog feed -->
  <w:auto_discovery_link title='RSS Feed' href='/blog.xml' />
</w:if_url>
<w:unless_url matches='blog|post'>  <!-- for all other pages, use the feed for everything but posts -->
  <w:auto_discovery_link title='RSS Feed' href='/feed.xml' />
</w:unless_url>