CatalystX::Usul::View::HTML - Render a page of HTML or XHTML
Describes v0.17.$Rev: 1 $
use CatalystX::Usul::Moose; extends qw(CatalystX::Usul::View);
Generate a page of HTML or XHTML using Template Toolkit and the contents of the stash
Defines the following list of attributes
Defaults to an empty hash ref. Populated by "COMPONENT"
Basename of the file containing the CSS for the generated page. Defaults to presentation
presentation
Basename of the file containing the Javascript used to modify the default behaviour of the browser. Defaults to behaviour
behaviour
Basename of the Template::Toolkit file used to generate the page. Defaults to layout
layout
String appended to font names to create a font filename. Defaults to .typeface.js
Name of the directory that contains the JavaScript font replacement files. Defaults to fonts
fonts
Defaults to an empty hash ref. Populated by "COMPONENT" it maps font names to the pathnames
An array ref the overrides the list in the parent class. Contains the stash keys that are searched for widget definitions
Defaults to an empty hash ref. Populated by "COMPONENT" it maps skin names onto paths for the behaviour class library
A required directory that contains all of the JavaScript class libraries (except for the one in the skin directory)
A partial path used to construct uris to the JavaScript class libraries. Defaults to static/jscript
Defaults to an empty array ref. Populated in the component configuration it lists the additional directories to search for language dependent JavaScript files
Defaults to an empty hash ref. Populated by "COMPONENT" it maps the language dependent JavaScript filenames to pathnames
A string which defaults to lang. It is the name of the directory that contains the language dependent JavaScript files
lang
Defaults to an empty array ref. Populated by "COMPONENT" it lists JavaScript class library files which can be optionally included on a page
Defaults to an empty array ref. Populated by "COMPONENT" it lists JavaScript class library files which will be included on every page
A string which defaults to top. The HTML window target
top
String which defaults to .tt. The extension applied to Template::Toolkit files
Defaults to an empty hash ref. Populated by "COMPONENT" it caches the per page custom templates
An instance of Catalyst::View::TT
Looks up and caches CSS, Javascript and template files rather than test for their existence with each request
Adds the provided error message to the result div after prepending a stock phrase specific to the failed action
Dummy method, does nothing in this view
Returns the _method parameter from the query which is used by the action class to lookup the action to forward to. Called from the begin method once the current view has been determined from the request content type
begin
Proxy for "bad_request"
Calls "_fix_stash", _build_widgets, "_setup_css" and "_setup_jscript" before calling Template::Toolkit via the parent class. Will also call "_fillform" if the override attribute was set in the stash to indicate an error. Encodes the response body using the currently selected encoding
_build_widgets
_build_widgets in CatalystX::Usul::View is passed those parts of the stash that might contain widget definitions which it renders as HTML or XHTML
Uses HTML::FillInForm to fill in the response body from the request parameters
Adds some extra entries to the stash
Detects and loads a custom template if one has been created for this page
Sets the target for this page in the headers
For the selected skin sets up the data for the main CSS link and the alternate CSS links if any exist
For the selected skin adds it's Javascript file to the list files that will be linked into the page
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan, <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2014 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install CatalystX::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::Usul
CPAN shell
perl -MCPAN -e shell install CatalystX::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.