RSS Feed Auto Discovery Code

From Adult Web Scripts Wiki

Jump to: navigation, search

Every page (except for one with urlconfig type of 'none') has an associated RSS feed. Adding this code to your header template within the <HEAD> section will instruct the browser to the URL for bookmarking etc:

PHP

<? if ($URL['type'] != 'none'): ?>
<link rel="alternate" type="application/rss+xml" 
      title="<?= $title ?> RSS Feed" 
      href="<?= zestoi_syndication_url() ?>" />
<? endif; ?>

Smarty

{if $URL.type != 'none'}
<link rel="alternate" type="application/rss+xml" 
      title="{$page_title} RSS Feed" 
      href="{syndication_url}" />
{/if}