Name : perl-ZM-Template
| |
Version : 0.7.2
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 6.1
| Date : 2015-01-23 17:16:07
|
Group : Development/Libraries/Perl
| Source RPM : perl-ZM-Template-0.7.2-6.1.src.rpm
|
Size : 0.04 MB
| |
Packager : (none)
| |
Summary : Merges runtime data with static HTML or Plain Text template file.
|
Description :
In an ideal web system, the HTML used to build a web page would be kept distinct from the application logic populating the web page. This module tries to achieve this by taking over the chore of merging runtime data with a static html template. Template can contain SSI derectives like < !--#include file=\"...\" --> and < !--#exec cgi=\"...\" --> It is used ZM::SSI for SSI parsing. If module ZM::SSI not installed SSI derectives will be ignoring.
The ZM::Template module can address the following template scenarios :
* *
Single values assigned to tokens
* *
Multiple values assigned to tokens (as in html table rows)
* *
Single pages built from multiple templates (ie: header, footer, body)
* *
html tables with runtime determined number of columns
An template consists of 2 parts; the boilerplate and the tokens (place holders) where the variable data will sit.
A token has the format __tokenName__ and can be placed anywhere within the template file. If it occurs in more than one location, when the data is merged with the template, all occurences of the token will be replaced.
< p> My name is __userName__ and I am aged __age__. My friends often call me __nickName__ although my name is __userName__.
When an html table is being populated, it will be necessary to output several values for each token. This will result in multiple rows in the table. However, this will only work if the tokens appear within a repeating block.
To mark a section of the template as repeating, it needs to be enclosed within a matching pair of repeating block tokens. These have the format __x_blockName__. They must always come in pairs.
and I have the following friends < table> __x_friends__ < tr> < td>__friendName__< /td>< td>__friendNickName__< /td> < /tr> __x_friends__ < /table>
For interleave data in loop used __z_ token
and I have the following friends < table> __x_friends__ < tr> < td bgcolor=\"#FEFEFE\">__friendName__< /td>< td>__friendNickName__< /td> < /tr> __z_friends__ < tr> < td bgcolor=\"#FFFFFF\">__friendName__< /td>< td>__friendNickName__< /td> < /tr> __x_friends__ < /table>
Count of __z_ token is UNLIMITED.
Template engine understand inner loops like this
List of companies: __x_companies__ Company name: __name__ Company address: __address__ Company e-mails: __x_emails__ __email__ __x_emails__ Company web: __web__ __x_companies__
For condition __if_ token. They must always come in pairs.
List of companies: __x_companies__ Company name: __name__ Company address: __address__ Company e-mails: __x_emails__ __email__ __x_emails__ __if_company_web__ Company web: __web__ __if_company_web__ __x_companies__
Template engine understand __else_ token within __if_ token.
List of companies: __x_companies__ Company name: __name__ Company address: __address__ Company e-mails: __x_emails__ __email__ __x_emails__ __if_company_web__ Company web: __web__ __else_company_web__ Company have not web site __if_company_web__ __x_companies__
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-Z/openSUSE_13.2/noarch |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
perl(ZM::Template)
perl-ZM-Template
Requires :