The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Babble::Output::HTML - HTML output method for Babble

SYNOPSIS

 use Babble;

 my $babble = Babble->new ();
 ...
 print $babble->output (-type => "HTML",
			-template => "example.tmpl",
			meta_title => "Example Babble",
			meta_desc => "This is an example babble");

DESCRIPTION

This module implements the HTML output method for Babble, thus, it only has one method: output(), which generates HTML output from the available items, using HTML::Template.

METHODS

_split_items()

Split the retrieved feed items into an array of dates. So items submitted on the same date will be kept near each other. The structure of the resulting hash is something like this:

  @dates = {
	"2004-02-01" => {
		date => "2004-02-01",
		items => @list_of_items
	}
  };

This should not be called directly.

output($babble, $params)

This output method recognises only the template argument, which will be passed to HTML::Template->new(). All other arguments will be made available for use in the template.

Along with the arguments passed to this method, the paramaters set up with $babble->add_params(), an array of channels, and an array of dates will be made available for the template.

See the source of this module, HTML::Template and any of the example templates for details.

AUTHOR

Gergely Nagy, algernon@bonehunter.rulez.org

Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.

SEE ALSO

Babble, HTML::Template, Babble::Output