NAME
Apache::PageKit::View - Bridge between Apache::PageKit and HTML::Template
DESCRIPTION
This class is a wrapper class to HTML::Template. It simplifies the calls to output a new template, stores the parameters to be used in a template, and fills in CGI forms using HTML::FillInForm and resolves <PKIT_*> tags.
METHODS
The following methods are available to the user as Apache::PageKit::View API.
- new
-
my $view = new Apache::PageKit::View;
Constructor for new object.
- param
-
This is similar to the HTML::Template method. It is used to set template variables.
$view->param(USERNAME => "John Doe");
Sets the parameter USERNAME to "John Doe". That is
<TMPL_VAR NAME="USERNAME">
will be replaced with "John Doe".It can also be used to set multiple parameters at once:
$view->param(firstname => $firstname, lastname => $lastname);
- prepare_module
-
$view->prepare_module(34);
Calles the code for the module with id 34 and fills in the module template.
- prepare_page
-
$view->prepare_page;
Calles the code for the page and fills in the page template.
- prepare_entire_page
-
Resolves
<PKIT_*>
tags and fills in HTML forms using HTML::FillInForm. - output_ref
-
Returns a reference to the output of the parsed template.
SEE ALSO
Apache::PageKit, HTML::FillInForm, HTML::Template
AUTHOR
T.J. Mather (tjmather@thoughtstore.com)
COPYRIGHT
Copyright (c) 2000, ThoughtStore, Inc. All rights Reserved. PageKit is a trademark of ThoughtStore, Inc.
LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Ricoh Source Code Public License for more details.
You can redistribute this module and/or modify it only under the terms of the Ricoh Source Code Public License.
You should have received a copy of the Ricoh Source Code Public License along with this program; if not, obtain one at http://www.pagekit.org/license