most of the new pluggable template system
This commit is contained in:
parent
ba2774a146
commit
eda7058b61
11 changed files with 450 additions and 9 deletions
59
lib/WebGUI/Asset/Template/_parser.skeleton
Executable file
59
lib/WebGUI/Asset/Template/_parser.skeleton
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
package WebGUI::Asset::Template::SomeTemplateType;
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
this software.
|
||||
-------------------------------------------------------------------
|
||||
http://www.plainblack.com info@plainblack.com
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use base 'WebGUI::Asset::Template::Parser';
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName ( )
|
||||
|
||||
Returns the human readable name of this parser.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
my $self = shift;
|
||||
return "My New Parser";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 process ( template, vars )
|
||||
|
||||
Evaluate a template replacing template commands for HTML.
|
||||
|
||||
=head3 template
|
||||
|
||||
A scalar variable containing the template.
|
||||
|
||||
=head3 vars
|
||||
|
||||
A hash reference containing template variables and loops.
|
||||
|
||||
=cut
|
||||
|
||||
sub process {
|
||||
my $self = shift;
|
||||
my $template = shift;
|
||||
my $vars = $self->addSessionVars(shift);
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue