The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Templer::Plugin::RSS - A plugin to include RSS feeds in pages.

SYNOPSIS

The following is a good example use of this plugin

  title: About my site
  feed: rss(4, http://blog.steve.org.uk/index.rss )
  ----
  <p>This is my page content.</p>
  <ul>
  <!-- tmpl_loop name='feed' -->
    <li><a href="<!-- tmpl_var name='link' -->"><!-- tmpl_var name='title' --></a></li>
  <!-- /tmpl_loop -->
  </ul>

Here the variable 'feed' will contain the first four elements of the RSS feed my blog produces.

The feed entries will contain the following three attributes

author The author of the post.
title The title of the popst

DESCRIPTION

This plugin uses XML::Feed to extract remote RSS feeds and allow them to be included in your site bodies - if that module is not available then the plugin will disable itself.

LICENSE

This module is free software; you can redistribute it and/or modify it under the terms of either:

a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or

b) the Perl "Artistic License".

AUTHOR

Steve Kemp <steve@steve.org.uk>

COPYRIGHT AND LICENSE

Copyright (C) 2015 Steve Kemp <steve@steve.org.uk>.

This library is free software. You can modify and or distribute it under the same terms as Perl itself.

METHODS

new

Constructor. No arguments are required/supported.

expand_variables

This is the method which is called by the Templer::Plugin::Factory to expand the variables contained in a Templer::Site::Page object.

This method will expand any variable that has a defintion of the form "rss( NN, http... )" and replace the variable definition with the result of fetching that RSS feed.