FFRIndexed::Template::Plugin - plugin base class for results


  package FFRIndexed::Template::Plugin::MyList;
  use strict;
  use base 'FFRIndexed::Template::Plugin';

  # See below for methods to override


These plugins are for providing additional links and rendering the resultsets according to these additional links.

Maybe later on there will be a plugin for rendering the main body of the resultset, and its surroundings.

But not yet.

The class derives from Class::Accessor, thus its constructor needs to be called with a hash refernce.

There are three accessors:


Returns the text to display to the user.


Returns the content type header to send for the item.

The default is text/html


Returns a hash reference of the mapping between locations and templates.

The currently well known locations are:

  page         A complete page on its own
  summary      A summary just above the table

The default is page = 'query'>, so it likely should be overridden.


Holds the mapping of types to templates. The template will be either included or run as its own file, depending on the type.

The current well-known types are

  page      A complete page
  summary   Stuff rendered above the table paging the current collection
  item      Stuff rendered for a single item


Should return true if the plugin applies to the current result set.

In the base class, this always returns true so any deriving plugin should override this.

The ROW entry is undef for the page or summary render types.

template CLASS

Returns the template file to use/include. The template will be called with at least the parameter query.