template engine
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2288
Expose PHP template engine 1.1.2
Expose is a template engine written in PHP. more>>
Expose PHP template engine is a template engine written in PHP. A template is a special kind of document that describes how a page will look like. How does this differ from writing webpages/applications using ordinary PHP files?
A template does not contain code to fetch data from a database or deal with forms. It only contains code how this data is transformed to HTML.
Some reasons to use the Expose template engine:
- Application logic and presentation is separated. It makes your code much more beautiful and manageable.
- Templates are fed only the parameters you specifiy and support only a subset of native PHP functions. This means safer code and your designers will be happier, because they dont have to inject their HTML in application code.
- Expose supports server- and client-sided caching. This will considerably cut down on server/database load and reduces bandwidth.
- Expose has built-in locale support. Translators can work with separate files and never need to touch application files or templates. Writing applications in multiple languages has become easier than ever before!
- Plugins simplify common tasks like inserting a select box or date picker in your page.
- The template script language is based on PHP, which means you dont have to learn a new language.
Enhancements:
- The Boolean "and" (&&) operator is now properly recognized.
- Several array PHP functions are now registered at default.
- The first newline after the close tag (?>) is now stripped like expected.
- The built-in display() template function now correctly passes additional parameters to the included template.
<<lessA template does not contain code to fetch data from a database or deal with forms. It only contains code how this data is transformed to HTML.
Some reasons to use the Expose template engine:
- Application logic and presentation is separated. It makes your code much more beautiful and manageable.
- Templates are fed only the parameters you specifiy and support only a subset of native PHP functions. This means safer code and your designers will be happier, because they dont have to inject their HTML in application code.
- Expose supports server- and client-sided caching. This will considerably cut down on server/database load and reduces bandwidth.
- Expose has built-in locale support. Translators can work with separate files and never need to touch application files or templates. Writing applications in multiple languages has become easier than ever before!
- Plugins simplify common tasks like inserting a select box or date picker in your page.
- The template script language is based on PHP, which means you dont have to learn a new language.
Enhancements:
- The Boolean "and" (&&) operator is now properly recognized.
- Several array PHP functions are now registered at default.
- The first newline after the close tag (?>) is now stripped like expected.
- The built-in display() template function now correctly passes additional parameters to the included template.
Download (0.020MB)
Added: 2006-04-20 License: GPL (GNU General Public License) Price:
1288 downloads
Smarty PHP template engine 2.6.18
Smarty PHP template engine is a template engine for PHP. more>>
Smarty project is a template engine for PHP. Many other template engines for PHP provide basic variable substitution and dynamic block functionality.
Smarty takes a step further to be a "smart" template engine, adding features such as configuration files, template functions, and variable modifiers, and making all of this functionality as easy as possible to use for both programmers and template designers.
Smarty also converts the templates into PHP scripts, eliminating the need to parse the templates on every invocation. This makes Smarty extremely scalable and managable for large application needs.
Main features:
- Caching: Smarty provides fine-grained caching features for caching all or parts of a rendered web page, or leaving parts uncached. Programmers can register template functions as cacheable or non-cachable, group cached pages into logical units for easier management, etc.
- Configuration Files: Smarty can assign variables pulled from configuration files. Template designers can maintain values common to several templates in one location without intervention from the programmer, and config variables can easily be shared between the programming and presentation portions of the application.
- Security: Templates do not contain PHP code. Therefore, a template designer is not unleashed with the full power of PHP, but only the subset of functionality made available to them from the programmer (application code.)
- Easy to Use and Maintain: Web page designers are not dealing with PHP code syntax, but instead an easy-to-use templating syntax not much different than plain HTML. The templates are a very close representation of the final output, dramatically shortening the design cycle.
- Variable Modifiers: The content of assigned variables can easily be adjusted at display-time with modifiers, such as displaying in all upper-case, html-escaped, formatting dates, truncating text blocks, adding spaces between characters, etc. Again, this is accomplished with no intervention from the programmer.
- Template Functions: Many functions are available to the template designer to handle tasks such as generating HTML code segments (dropdowns, tables, pop-ups, etc.), displaying content from other templates in-line, looping over arrays of content, formatting text for e-mail output, cycling though colors, etc.
- Filters: The programmer has complete control of template output and compiled template content with pre-filters, post-filters and output-filters.
- Resources: Templates can be pulled from any number of sources by creating new resource handlers, then using them in the templates.
- Plugins: Almost every aspect of Smarty is controlled through the use of plugins. They are generally as easy as dropping them into the plugin directory and then mentioning them in the template or using them in the application code. Many user-community contributions are also available. (See the plugins section of the forum and wiki.)
- Add-ons: Many user-community contributed Add-ons are available such as Pagination, Form Validation, Drop Down Menus, Calander Date Pickers, etc. These tools help speed up the development cycle, there is no need to re-invent the wheel or debug code that is already stable and ready for deployment. (see the Add-ons section of the forum and wiki.)
- Debugging: Smarty comes with a built-in debugging console so the template designer can see all of the assigned variables and the programmer can investigate template rendering speeds.
- Compiling: Smarty compiles templates into PHP code behind the scenes, eliminating run-time parsing of templates.
- Performance: Smarty performs extremely well, despite its vast feature set. Most of Smartys capabilities lie in plugins that are loaded on-demand. Smarty comes with numerous presentation tools, minimizing your application code and resulting in quicker, less error-prone application development/deployment. Smarty templates get compiled to PHP files internally (once), eliminating costly template file scans and leveraging the speed of PHP op-code accelerators.
<<lessSmarty takes a step further to be a "smart" template engine, adding features such as configuration files, template functions, and variable modifiers, and making all of this functionality as easy as possible to use for both programmers and template designers.
Smarty also converts the templates into PHP scripts, eliminating the need to parse the templates on every invocation. This makes Smarty extremely scalable and managable for large application needs.
Main features:
- Caching: Smarty provides fine-grained caching features for caching all or parts of a rendered web page, or leaving parts uncached. Programmers can register template functions as cacheable or non-cachable, group cached pages into logical units for easier management, etc.
- Configuration Files: Smarty can assign variables pulled from configuration files. Template designers can maintain values common to several templates in one location without intervention from the programmer, and config variables can easily be shared between the programming and presentation portions of the application.
- Security: Templates do not contain PHP code. Therefore, a template designer is not unleashed with the full power of PHP, but only the subset of functionality made available to them from the programmer (application code.)
- Easy to Use and Maintain: Web page designers are not dealing with PHP code syntax, but instead an easy-to-use templating syntax not much different than plain HTML. The templates are a very close representation of the final output, dramatically shortening the design cycle.
- Variable Modifiers: The content of assigned variables can easily be adjusted at display-time with modifiers, such as displaying in all upper-case, html-escaped, formatting dates, truncating text blocks, adding spaces between characters, etc. Again, this is accomplished with no intervention from the programmer.
- Template Functions: Many functions are available to the template designer to handle tasks such as generating HTML code segments (dropdowns, tables, pop-ups, etc.), displaying content from other templates in-line, looping over arrays of content, formatting text for e-mail output, cycling though colors, etc.
- Filters: The programmer has complete control of template output and compiled template content with pre-filters, post-filters and output-filters.
- Resources: Templates can be pulled from any number of sources by creating new resource handlers, then using them in the templates.
- Plugins: Almost every aspect of Smarty is controlled through the use of plugins. They are generally as easy as dropping them into the plugin directory and then mentioning them in the template or using them in the application code. Many user-community contributions are also available. (See the plugins section of the forum and wiki.)
- Add-ons: Many user-community contributed Add-ons are available such as Pagination, Form Validation, Drop Down Menus, Calander Date Pickers, etc. These tools help speed up the development cycle, there is no need to re-invent the wheel or debug code that is already stable and ready for deployment. (see the Add-ons section of the forum and wiki.)
- Debugging: Smarty comes with a built-in debugging console so the template designer can see all of the assigned variables and the programmer can investigate template rendering speeds.
- Compiling: Smarty compiles templates into PHP code behind the scenes, eliminating run-time parsing of templates.
- Performance: Smarty performs extremely well, despite its vast feature set. Most of Smartys capabilities lie in plugins that are loaded on-demand. Smarty comes with numerous presentation tools, minimizing your application code and resulting in quicker, less error-prone application development/deployment. Smarty templates get compiled to PHP files internally (once), eliminating costly template file scans and leveraging the speed of PHP op-code accelerators.
Download (0.14MB)
Added: 2007-03-11 License: LGPL (GNU Lesser General Public License) Price:
962 downloads
Template Lite 2.10
Template Lite is a smaller, faster alternative to the Smarty template engine. more>>
Template Lite is a smaller, faster alternative to the Smarty template engine.
For the most part, it is a drop in replacement for Smarty but uses around half of the memory and is considerably faster and far less CPU intensive when compiling and displaying templates.
Template lite was originally created by Paul Lockaby as a smaller replacement for Smarty. The original package was called Smarty Light. Even though Smarty is an Open Source project the creators of Smarty decided to trademark the name Smarty. Because of this trademarking of the name they contacted Paul Lockaby and told him he could nolonger use Smarty in the name for the package.
Paul Lockaby gave me permission to fork the project if I wanted as he was closing down support and developement for Smarty Light. The initial release of Template Lite contains a few minor bug fixes and some extra features.
I plan on adding more features to Template Lite over the next few months. For the most part Template Lite is a drop in replacement for Smarty. The nice thing about this package is how it uses around half of the memory of Smarty and it is considerably FASTER and far less CPU intensive when compiling and displaying templates.
Enhancements:
- register_resource and unregister_resource support was added.
- Different resources are supported by everything except for cached template output.
- The _get_resource internal function was added for processing "file:" and absolute tag resources.
- The resize_image plugin was added.
- Support for absolute paths to template files was fixed.
<<lessFor the most part, it is a drop in replacement for Smarty but uses around half of the memory and is considerably faster and far less CPU intensive when compiling and displaying templates.
Template lite was originally created by Paul Lockaby as a smaller replacement for Smarty. The original package was called Smarty Light. Even though Smarty is an Open Source project the creators of Smarty decided to trademark the name Smarty. Because of this trademarking of the name they contacted Paul Lockaby and told him he could nolonger use Smarty in the name for the package.
Paul Lockaby gave me permission to fork the project if I wanted as he was closing down support and developement for Smarty Light. The initial release of Template Lite contains a few minor bug fixes and some extra features.
I plan on adding more features to Template Lite over the next few months. For the most part Template Lite is a drop in replacement for Smarty. The nice thing about this package is how it uses around half of the memory of Smarty and it is considerably FASTER and far less CPU intensive when compiling and displaying templates.
Enhancements:
- register_resource and unregister_resource support was added.
- Different resources are supported by everything except for cached template output.
- The _get_resource internal function was added for processing "file:" and absolute tag resources.
- The resize_image plugin was added.
- Support for absolute paths to template files was fixed.
Download (0.086MB)
Added: 2007-01-05 License: LGPL (GNU Lesser General Public License) Price:
1029 downloads
TemplAT 1.2
TemplAT is a general-purpose text-file template engine, designed to be used as an API from Java applications or servlets. more>>
TemplAT is a general-purpose text-file template engine, designed to be used as an API from Java applications or servlets. It is small (39K) and simple, yet surprisingly powerful. It does not have any external library dependencies.
TemplAT is distributed under the Apache License 2.0.
Main features:
Simple
- The TemplAT language is very simple to learn. It contains only the most basic programming constructs: if-then-else, loop, and include (with parameters). It also allows calling Java methods and accessing Java arrays. Thats all there is to it. And yet, these few simple tools provide a powerful templating language.
Small
- The TemplAT class library consists of a 39K jar file. And thats it. It is designed to contain only what is necessary to provide its simple language, and nothing more. It is self-contained, and does not rely on any other external libraries.
Useful
- TemplAT can be used for generating HTML pages by a Java servlet for a web server. It could just as easily be used for generating Java, C++, or SQL source code. It is useful for any text file where you need some kind of programming ability (loops, if-then-else, includes, method calls).
Reliable
- The TemplAT source codes correctness is backed by a comprehensive suite of JUnit tests. This ensures that each new release will add features and improvements while preventing regression. It allows for the developers to refactor code and improve its internal state without introducing new bugs. The internal structure of the code is clean, simple, and straightforward.
Enhancements:
- The packages were renamed to net.sourceforge.templat.
- The "parse" method was renamed to "render".
- The NOTICE file was added.
- Some refactoring was done.
- Minor error handling improvements were made.
<<lessTemplAT is distributed under the Apache License 2.0.
Main features:
Simple
- The TemplAT language is very simple to learn. It contains only the most basic programming constructs: if-then-else, loop, and include (with parameters). It also allows calling Java methods and accessing Java arrays. Thats all there is to it. And yet, these few simple tools provide a powerful templating language.
Small
- The TemplAT class library consists of a 39K jar file. And thats it. It is designed to contain only what is necessary to provide its simple language, and nothing more. It is self-contained, and does not rely on any other external libraries.
Useful
- TemplAT can be used for generating HTML pages by a Java servlet for a web server. It could just as easily be used for generating Java, C++, or SQL source code. It is useful for any text file where you need some kind of programming ability (loops, if-then-else, includes, method calls).
Reliable
- The TemplAT source codes correctness is backed by a comprehensive suite of JUnit tests. This ensures that each new release will add features and improvements while preventing regression. It allows for the developers to refactor code and improve its internal state without introducing new bugs. The internal structure of the code is clean, simple, and straightforward.
Enhancements:
- The packages were renamed to net.sourceforge.templat.
- The "parse" method was renamed to "render".
- The NOTICE file was added.
- Some refactoring was done.
- Minor error handling improvements were made.
Download (0.039MB)
Added: 2006-11-15 License: The Apache License 2.0 Price:
1073 downloads
Template::Plugins 2.19
Template::Plugins is a Perl module with plugin provider module. more>>
Template::Plugins is a Perl module with plugin provider.
SYNOPSIS
use Template::Plugins;
$plugin_provider = Template::Plugins->new(%options);
($plugin, $error) = $plugin_provider->fetch($name, @args);
The Template::Plugins module defines a provider class which can be used to load and instantiate Template Toolkit plugin modules.
<<lessSYNOPSIS
use Template::Plugins;
$plugin_provider = Template::Plugins->new(%options);
($plugin, $error) = $plugin_provider->fetch($name, @args);
The Template::Plugins module defines a provider class which can be used to load and instantiate Template Toolkit plugin modules.
Download (0.76MB)
Added: 2007-08-08 License: Perl Artistic License Price:
807 downloads
Template::Magic 1.39
Template::Magic is a Perl module for magic merger of runtime values with templates. more>>
Template::Magic is a Perl module for magic merger of runtime values with templates.
SYNOPSIS
Just add these 2 magic lines to your code...
use Template::Magic;
Template::Magic->new->print( /path/to/template );
to have all your variable and subroutines merged with the template file, or set one or more constructor array to customize the output generation as you need:
use Template::Magic qw( -compile );
$tm = new Template::Magic
paths => [ qw(/any/path /any/other/path) ] ,
markers => [ qw( < / > ) ] ,
lookups => [ %my_hash, $my_obj, main ] ,
zone_handlers => [ &my_zone_handler, _EVAL_ ] ,
value_handlers => [ DEFAULT, &my_value_handler ] ,
text_handlers => sub {print lc $_[1]} ,
output_handlers => sub {print uc $_[1]} ,
post_handlers => &my_post_handler ,
options => no_cache ;
$tm->nprint( template => /path/to/template
lookups => %my_special_hash );
<<lessSYNOPSIS
Just add these 2 magic lines to your code...
use Template::Magic;
Template::Magic->new->print( /path/to/template );
to have all your variable and subroutines merged with the template file, or set one or more constructor array to customize the output generation as you need:
use Template::Magic qw( -compile );
$tm = new Template::Magic
paths => [ qw(/any/path /any/other/path) ] ,
markers => [ qw( < / > ) ] ,
lookups => [ %my_hash, $my_obj, main ] ,
zone_handlers => [ &my_zone_handler, _EVAL_ ] ,
value_handlers => [ DEFAULT, &my_value_handler ] ,
text_handlers => sub {print lc $_[1]} ,
output_handlers => sub {print uc $_[1]} ,
post_handlers => &my_post_handler ,
options => no_cache ;
$tm->nprint( template => /path/to/template
lookups => %my_special_hash );
Download (0.045MB)
Added: 2007-07-11 License: Perl Artistic License Price:
839 downloads
Drome Engine 0.3.3
Drome Engine is a 3D game engine thats written in C++ and uses OpenGL for graphics rendering. more>>
Drome Engine is a 3D game engine thats written in C++ and uses OpenGL for graphics rendering. Its currently under constant development; the main focus at this time is to improve and stabilize the application programming interface (API).
<<less Download (0.43MB)
Added: 2005-09-22 License: GPL (GNU General Public License) Price:
1497 downloads
madlibs engine 1.0
madlibs engine project is a MadLibs clone. more>>
madlibs engine project is a MadLibs clone.
The madlibs engine is a tiny engine for MadLibs-like interactive stories. Basically, you enter different words of a certain part of speech.
The program pastes them into a story text, creating weird, funny, or stupid results.
It runs on anything from a line printer to an xterm.
<<lessThe madlibs engine is a tiny engine for MadLibs-like interactive stories. Basically, you enter different words of a certain part of speech.
The program pastes them into a story text, creating weird, funny, or stupid results.
It runs on anything from a line printer to an xterm.
Download (4.62MB)
Added: 2006-11-22 License: GPL (GNU General Public License) Price:
1069 downloads
Template::Plugin::MP3 1.02
Template::Plugin::MP3 is a Perl interface to the MP3::Info Module. more>>
Template::Plugin::MP3 is a Perl interface to the MP3::Info Module.
SYNOPSIS
[% USE mp3 = MP3("Montana.mp3") %]
[% mp3.title %]
[% mp3.album %]
# perldoc MP3::Info for more ideas
Template::Plugin::MP3 provides a simple wrapper for using MP3::Info in object oriented mode; see MP3::Info for more details.
<<lessSYNOPSIS
[% USE mp3 = MP3("Montana.mp3") %]
[% mp3.title %]
[% mp3.album %]
# perldoc MP3::Info for more ideas
Template::Plugin::MP3 provides a simple wrapper for using MP3::Info in object oriented mode; see MP3::Info for more details.
Download (0.018MB)
Added: 2006-11-08 License: Perl Artistic License Price:
1087 downloads
SmartTemplate 1.2.1
SmartTemplate is a Template Engine that was designed to support large scale, web based applications. more>>
SmartTemplate is a Template Engine that was designed to support large scale, web based applications.
Whats so special about it?
Common template engines work like the following: Your PHP script specifies an HTML template and assigns some dynamic content to display. The template parser replaces all placeholders within the template with the assigned content and displays it to the user. This means a lot of string processing and regular expression work each time you want to display some content.
SmartTemplate works like a template compiler that converts templates into executable PHP code and stores it for later reuse. The first time a new template is processed, all placeholders in the template are replaced by small PHP code elements that print the assigned content. The HTML template fragment < H3 >{TITLE}< /H3 >, for example, is converted into something like < H3 >< ?php echo $TITLE; ? >< /H3 >. If you have assigned your content to the right variables, there is no need for any template parsing anymore. The only thing that has to be done is to include and execute the compiled template. This usually increases the execution time of the template engine dramatically.
SmartTemplate supports:
- Simple Scalar Substitution (Strings, etc.)
- Block Iterations (nested Arrays / BEGIN..END)
- Basic Control Structures (IF..ELSEIF..ELSE)
- Custom Extension (Output filters, uppercase, sprintf, etc.)
- Template Compilation (HTML templates are converted to executable PHP Code)
- SubTemplate System (HTML templates can be included on other templates)
- Output Caching (Accelerates your applications by reusing page output)
<<lessWhats so special about it?
Common template engines work like the following: Your PHP script specifies an HTML template and assigns some dynamic content to display. The template parser replaces all placeholders within the template with the assigned content and displays it to the user. This means a lot of string processing and regular expression work each time you want to display some content.
SmartTemplate works like a template compiler that converts templates into executable PHP code and stores it for later reuse. The first time a new template is processed, all placeholders in the template are replaced by small PHP code elements that print the assigned content. The HTML template fragment < H3 >{TITLE}< /H3 >, for example, is converted into something like < H3 >< ?php echo $TITLE; ? >< /H3 >. If you have assigned your content to the right variables, there is no need for any template parsing anymore. The only thing that has to be done is to include and execute the compiled template. This usually increases the execution time of the template engine dramatically.
SmartTemplate supports:
- Simple Scalar Substitution (Strings, etc.)
- Block Iterations (nested Arrays / BEGIN..END)
- Basic Control Structures (IF..ELSEIF..ELSE)
- Custom Extension (Output filters, uppercase, sprintf, etc.)
- Template Compilation (HTML templates are converted to executable PHP Code)
- SubTemplate System (HTML templates can be included on other templates)
- Output Caching (Accelerates your applications by reusing page output)
Download (0.008MB)
Added: 2006-07-04 License: GPL (GNU General Public License) Price:
1216 downloads
Template::Manual::Plugins 2.15
Template::Manual::Plugins is Perl module for standard plugins. more>>
Template::Manual::Plugins is Perl module for standard plugins.
This section lists the standard plugins which can be used to extend the runtime functionality of the Template Toolkit. The plugins are distributed with the Template Toolkit but may required additional modules from CPAN.
TEMPLATE TOOLKIT PLUGINS
The following plugin modules are distributed with the Template Toolkit. Some of the plugins interface to external modules (detailed below) which should be downloaded from any CPAN site and installed before using the plugin.
Enhancements:
- Perl
<<lessThis section lists the standard plugins which can be used to extend the runtime functionality of the Template Toolkit. The plugins are distributed with the Template Toolkit but may required additional modules from CPAN.
TEMPLATE TOOLKIT PLUGINS
The following plugin modules are distributed with the Template Toolkit. Some of the plugins interface to external modules (detailed below) which should be downloaded from any CPAN site and installed before using the plugin.
Enhancements:
- Perl
Download (0.76MB)
Added: 2006-09-19 License: Perl Artistic License Price:
1132 downloads
The Wurld 3D Engine 0.4
The Wurld 3D Engine is yet another 3D gaming engine. more>>
The Wurld 3D Engine is yet another 3D gaming engine. It is light, fast, has minimal external requirements, and is still very immature. The project is Python scriptable, including support for generating models using 3D turtle graphics.
<<less Download (0.88MB)
Added: 2007-06-11 License: BSD License Price:
871 downloads
Template::Plugin::JSON 0.02
Template::Plugin::JSON is a Perl module that adds a .json vmethod for all TT values. more>>
Template::Plugin::JSON is a Perl module that adds a .json vmethod for all TT values.
SYNOPSIS
[% USE JSON %];
< script type="text/javascript" >
var foo = [% foo.json %];
< /script >
This plugin provides a .json vmethod to all value types when loaded.
With no argument it will try to load JSON::Syck and then JSON::Converter. If used as [% USE JSON("Syck") %] or [% USE JSON("Converter") %] it will load that specific plugin.
If no plugin could be loaded an exception is thrown. Check for errors from "process" in Template.
<<lessSYNOPSIS
[% USE JSON %];
< script type="text/javascript" >
var foo = [% foo.json %];
< /script >
This plugin provides a .json vmethod to all value types when loaded.
With no argument it will try to load JSON::Syck and then JSON::Converter. If used as [% USE JSON("Syck") %] or [% USE JSON("Converter") %] it will load that specific plugin.
If no plugin could be loaded an exception is thrown. Check for errors from "process" in Template.
Download (0.004MB)
Added: 2007-02-19 License: Perl Artistic License Price:
977 downloads
HCKit::Template 0.02
HCKit::Template is a Perl module with a template system for HTML construction. more>>
HCKit::Template is a Perl module with a template system for HTML construction.
This module constructs an HTML page from a template. The conversion proceeds with the help of rewrite rules and data sources. Rewrite rules can be specified in the template file itself, or in the Perl script. Data sources can be XML files, or dynamically constructed in the Perl script.
<<lessThis module constructs an HTML page from a template. The conversion proceeds with the help of rewrite rules and data sources. Rewrite rules can be specified in the template file itself, or in the Perl script. Data sources can be XML files, or dynamically constructed in the Perl script.
Download (0.011MB)
Added: 2006-09-20 License: Perl Artistic License Price:
1129 downloads
Template::Plugin::SumOf 0.01
Template::Plugin::SumOf is a Perl module to calculate the sum with VMETHODS. more>>
Template::Plugin::SumOf is a Perl module to calculate the sum with VMETHODS.
SYNOPSIS
# in your script
use Template;
use Template::Plugin::SumOf;
my $tt = Template->new;
$tt->process(
template.html,
{
ary => [
{ date => 2006-09-13, price => 300 },
{ date => 2006-09-14, price => 500 }
]
}
)
or die $tt->error;
# in your template.
[% USE SumOf -%]
[%- FOR elem IN objects -%]
[% elem.date %],[% elem.price %]
[% END -%]
,[% objects.sum_of(price) %]
# result.
2006-09-13,300
2006-09-14,500
,800
You can easy to calcurate sum of array, with VMETHODS.
<<lessSYNOPSIS
# in your script
use Template;
use Template::Plugin::SumOf;
my $tt = Template->new;
$tt->process(
template.html,
{
ary => [
{ date => 2006-09-13, price => 300 },
{ date => 2006-09-14, price => 500 }
]
}
)
or die $tt->error;
# in your template.
[% USE SumOf -%]
[%- FOR elem IN objects -%]
[% elem.date %],[% elem.price %]
[% END -%]
,[% objects.sum_of(price) %]
# result.
2006-09-13,300
2006-09-14,500
,800
You can easy to calcurate sum of array, with VMETHODS.
Download (0.004MB)
Added: 2007-01-25 License: Perl Artistic License Price:
1002 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above template engine search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed