HTML::Template::SYNTAX

HTML::Template::SYNTAX is a Perl module with a syntax of HTML template language for HTML::Template.
Download

HTML::Template::SYNTAX Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Tregar
  • Publisher web site:
  • http://search.cpan.org/~wonko/CGI-Application-MailPage-1.6/lib/CGI/Application/MailPage.pm

HTML::Template::SYNTAX Tags


HTML::Template::SYNTAX Description

HTML::Template::SYNTAX is a Perl module with a syntax of HTML template language for HTML::Template. HTML::Template::SYNTAX is a Perl module with a syntax of HTML template language for HTML::Template.SYNOPSISThis help is only on syntax of html template files. For perl interface of HTML::Template::Pro you should see "SYNOPSIS" in HTML::Template::PerlInterface.First you make a template - this is just a normal HTML file with a few extra tags, the simplest being < TMPL_VAR >For example, test.tmpl: < html > < head >< title >Test Template< /title > < body > My Home Directory is < TMPL_VAR NAME=HOME > < p > My Path is set to < TMPL_VAR NAME=PATH > < /body > < /html >Now create a small CGI program: #!/usr/bin/perl -w use HTML::Template; # open the html template my $template = HTML::Template->new(filename => 'test.tmpl'); # fill in some parameters $template->param(HOME => $ENV{HOME}); $template->param(PATH => $ENV{PATH}); # send the obligatory Content-Type and print the template output print "Content-Type: text/htmlnn", $template->output;If all is well in the universe this should show something like this in your browser when visiting the CGI: My Home Directory is /home/some/directory My Path is set to /bin;/usr/binThis module attempts to make using HTML templates simple and natural. It extends standard HTML with a few new HTML-esque tags - < TMPL_VAR >, < TMPL_LOOP >, < TMPL_INCLUDE >, < TMPL_IF >, < TMPL_ELSE > and < TMPL_UNLESS >. (HTML::Template::Pro also supports < TMPL_ELSIF > tag.) The file written with HTML and these new tags is called a template. It is usually saved separate from your script - possibly even created by someone else! Using this module you fill in the values for the variables, loops and branches declared in the template. This allows you to separate design - the HTML - from the data, which you generate in the Perl script. Requirements: · Perl


HTML::Template::SYNTAX Related Software