NAME
App::ZofCMS::Plugin::ValidationLinks - plugin for people with bad memory to include Valid HTML/Valid CSS links pointing to validators
SYNOPSIS
In your Main Config File or ZofCMS Template file:
plugins => [ qw/ValidationLinks/ ]
In your HTML::Template template:
<tmpl_var name="val_link_html">
<tmpl_var name="val_link_css">
Produced HTML code:
<a href="http://validator.w3.org/check?uri=referer" title="Validate HTML code on this page">Valid HTML 4.01 Strict</a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" title="Validate CSS code on this page">Valid CSS</a>
DESCRIPTION
The module is a plugin for App::ZofCMS. It's pretty useless unless you are like me: have a really bad memory on URIs and sick and tired of looking up all those links. The links are http://validator.w3.org/check?uri=referer for (X)HTML and http://jigsaw.w3.org/css-validator/check/referer for CSS.
This documentation assumes you've read App::ZofCMS, App::ZofCMS::Config and App::ZofCMS::Template
MAIN CONFIG FILE AND ZofCMS TEMPLATE FIRST-LEVEL KEYS
plug_val_links
plug_val_links => {
html_text => 'Valid HTML 4.01 Strict',
css_text => 'Valid CSS',
xhtml => 0,
},
Optional. The plugin takes its configuration via a hashref assigned to a plug_val_links
first-level key in either Main Config File or ZofCMS Template. As opposed to many other plugins, this plugin will still execute even if the plug_val_links
key is not present; as long as you include the plugin in the list of plugins to execute. Possible keys/values of plug_val_links
hashref are as follows:
html_text
plug_val_links => {
html_text => 'Valid HTML 4.01 Strict',
}
Optional. Specifies the text for the "validate (X)HTML" link. Defaults to: Valid HTML 4.01 Strict
css_text
plug_val_links => {
css_text => 'Valid CSS',
},
Optional. Specifies the text for the "validate CSS" link. Defaults to: Valid CSS
xhtml
plug_val_links => {
xhtml => 0,
},
Optional. Pretty much the only purpose of this argument is for the title=""
attribute of the "validate (X)HTML" link. Takes either true or false values. When set to a true value the link will have title="Validate XHTML code on this page"
, when set to a false value the link will have title="Validate HTML code on this page"
. Defaults to: 0
(false)
HTML::Template VARIABLES
<tmpl_var name="val_link_html">
<tmpl_var name="val_link_css">
The plugin will set two keys in {t}
special keys, thus you'll have two HTML::Template variables to use:
val_link_html
<tmpl_var name="val_link_html">
Will contain the link to HTML validator to validate the current page.
val_link_css
<tmpl_var name="val_link_css">
Will contain the link to CSS validator to validate the current page.
NOTES ON TESTING
The W3C validator cannot validate pages that are not publicly accessible, i.e. (possibly) your development server; thus clicking the links from your local version of site will make the validator error out.
REPOSITORY
Fork this module on GitHub: https://github.com/zoffixznet/App-ZofCMS
BUGS
To report bugs or request features, please use https://github.com/zoffixznet/App-ZofCMS/issues
If you can't access GitHub, you can email your request to bug-App-ZofCMS at rt.cpan.org
AUTHOR
Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)
LICENSE
You can use and distribute this module under the same terms as Perl itself. See the LICENSE
file included in this distribution for complete details.