NAME

CGI::WeT::Modules::Basic - Basic rendering engine extensions

SYNOPSIS

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

DESCRIPTION

This module provides basic rendering constructs for the engine. Please be aware that the code supersedes the documentation. While I have tried to be accurate there are times that words fail me and a look at the code is far more enlightening than anything I could cobble together. This is especially true when trying to write a theme. Download a theme and see how someone else did it. Then try making modifications and see what happens.

EXTENSIONS

sub initialize { 1; }

BODY

This extension will insert the body of the themed HTML into the rendered page.

HBOX

This extension builds a box on the page by placing the contents in a <table>...</table> construct. Available arguments are: width, cellspacing, cellpadding, border, height, and bgcolor.

VBOX

This extension places its contents in a smaller box which is contained in a LINE. Available arguments are: width, valign, colspan, rowspan, height, align, background, bgcolor.

LINE

This extension puts together a set of VBOXs for inclusion in a HBOX.

CONTENT

This extension renders the top of the content stack and places the results in the page.

TEXT

This extension interprets the top of the content stack as plain text and places it in the page.

GRAPHIC

This extension will place a theme dependent graphic image in the page. Available arguments are `location' (relative to the theme's base image URL), `height,' `width,' `align,' `valign,' and `name.'

HEADERS

This extension places the text of a header line in the page. Available arguments are: key, align, size, and color.

This extension places a link relative to the top of the site around the content at the top of the content stack. The argument needed is `location.'

DUP

This extension duplicates the top of the content stack.

ROT

This extension takes the third element of the stack to the top of the stack.

SWAP

This extension swaps the top two elements of the content stack

POP

This extension discards the top of the content stack.

IF

This extension will leave either the second or the third element on the top of the content stack depending on whether or not the top element is true or false (non-blank or blank).

QIF

Given three elements on the top of the content stack, it will render the top element by the second or leave the third depending on whether the top is true or false (non-blank or blank).

IFMODULE

Operates the same as IF except the conditional is a list of modules given as arguments. For example

    '[IFMODULE module=NEWS_SUMMARY module=HELP_URL]'

will leave the top of the content stack if and only if both NEWS_SUMMARY and HELP_URL are available under in CGI::WeT::Modules:: . Otherwise, it will leave the next to the top of the content stack on top. In either case, the content stack will have one less element afterwards.

This extension will render the navigation for the particular page. Several arguments are available to customize the look.

type - if 'text' then rendering is done with text. Otherwise, the value is used to determine the directory in which the graphics images reside. This depends on the theme.

bullet - defines a graphical element to prefix the navigational elements with. Arguments that help define the image are: bullet_width, bullet_height.

align - if this is 'center' then the navigational element is centered.

begin - defines the initial HTML to use in building the navigation.

end - defines the final HTML to use in building the navigation.

top - if 'yes' will place a link to the top of the site.

up - if 'yes' will place a link to the level above the current level.

join - determins the HTML used between navigational elements.

level - if 'current' only places navigation for the current level. Otherwise, renders an outline from the top to the current level.

This extension renders a path of links from the top of the site to the current level. Currently only supports a type of `text.' Other arguments are:

join - the code to join to elements in the path.

ellipses - the code to indicate absence of intervening levels

depth - the number of levels to include in the path before dropping elements.

THEME_CHOOSER

This extension will place a form on the page allowing the user to choose a different theme. Requires a CGI script '/chooser.cgi' in the root of the site. The value of join is placed between the selection list and the submit button.

ALTERNATE_THEME

This extension duplicates LINK except that the location is the current page URL and the value of the theme argument is appended as part of the URL.

INCLUDE

This extension will read in a file given by the location argument and return the contents. The file is interpreted as a local URI.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 50:

=over without closing =back