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

NAME

CGI::WeT::Modules::News - Extensions to engine to allow article management

SYNOPSIS

    use CGI::WeT::Modules::News ();

DESCRIPTION

This module provides rendering constructs to allow navigation through a set of articles. Support is provided for multiple types of articles in multiple groupings (or channels).

EXTENSIONS

CGI::WeT::Modules::News::initialize($engine, $r)

This subroutine will initialize the engine passed as $engine with information from Apache (passed as $r). The base URL for articles is set with the following.

    PerlSetVar WeT_NewsURL /baseURL/

This is available for building URLs as @@NEWS@@. For example, general articles are under the URL returned by

    $engine->url('@@NEWS@@/general/');

The directory may likewise be found by using

    $engine->filename($engine->url('@@NEWS@@/general/'));
NEWS_SUMMARY

This extension will insert a summary of available news items starting with the most recent (ordered by submission time). The top of the content stack is applied to each item as a template.

The template used is called with four elements on the content stack: Title, Date, Author, and Summary (Title on top of stack). The available arguments for controlling NEWS_SUMMARY are

channel

This argument specifies which channel to collect items from. This defaults to `general.'

category

This argument specifies which category to collect items from. Only one category may be specified at this time. There is no way to block items marked as `all.' The default category is `all.'

If this is set to `title,' the title will be made a link. No other value has an effect.

number

This tells NEWS_SUMMARY how many items to put in the list. There is no default for this argument, so one must be supplied.

NEWS_NEXT

This extension is like CGI::WeT::Modules::Basic's LINK in that the top of the content stack is made into a link. The location is determined by the values of the arguments.

channel

See NEWS_SUMMARY

type

This can be either `story' or `response.' If `story,' then the articles in the top level are looked at. Otherwise, the articles in the current directory are examined.

sequence

This can be either `next' or `prev.'

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 45:

=over without closing =back

Around line 111:

=back doesn't take any parameters, but you said =back 4

Around line 253:

=back doesn't take any parameters, but you said =back 4