NAME

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

SYNOPSIS

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

  # See below for methods to override

ABSTRACT

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:

visual

Returns the text to display to the user.

content_type

Returns the content type header to send for the item.

The default is text/html

types

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.

types

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

applies QUERY, RESULTSET, REFINEMENTS, ROW

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.