Name
PGXN::Site::Templates - HTML templates for PGXN::Site
Synopsis
use PGXN::Site::Templates;
Template::Declare->init( dispatch_to => ['PGXN::Site::Templates'] );
print Template::Declare->show('home', $req, {
title => 'PGXN::Site',
});
Description
This class defines the HTML templates used by PGXN::Site. They are used internally by PGXN::Site::Controller to render the UI. They're implemented with Template::Declare, but interface wise, all you need to do is show
them as in the "Synopsis".
Templates
Wrapper
wrapper
Wrapper template called by all page view templates that wraps them in the basic structure of the site (logo, navigation, footer, etc.). It also handles the title of the site, and any status message or error message. These must be stored under the title
, status_msg
, and error_msg
keys in the args hash, respectively.
Full Page Templates
home
Renders the home page of the app.
Utility Functions
T
h1 { T 'Welcome!' };
Translates the string using PGXN::Site::Locale.
Author
David E. Wheeler <david@justatheory.com>
Copyright and License
Copyright (c) 2010-2024 David E. Wheeler.
This module is free software; you can redistribute it and/or modify it under the PostgreSQL License.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
In no event shall David E. Wheeler be liable to any party for direct, indirect, special, incidental, or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if David E. Wheeler has been advised of the possibility of such damage.
David E. Wheeler specifically disclaims any warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The software provided hereunder is on an "as is" basis, and David E. Wheeler has no obligations to provide maintenance, support, updates, enhancements, or modifications.