PerlPoint::Template::TT2PerlPoint::Template::TT2 is a beta of a PerlPoint template processor for Template Toolkit 2 layouts. | |
Download |
PerlPoint::Template::TT2 Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jochen Stenzel
- Publisher web site:
- http://search.cpan.org/~jstenzel/Getopt-ArgvFile-1.11/ArgvFile.pm
PerlPoint::Template::TT2 Tags
PerlPoint::Template::TT2 Description
PerlPoint::Template::TT2 is a beta of a PerlPoint template processor for Template Toolkit 2 layouts. PerlPoint::Template::TT2 is a beta of a PerlPoint template processor for Template Toolkit 2 layouts.METHODSnew()Parameters:classThe class name.Returns: the new object.Example: # start page $result.="nnnn"; # begin header $result.="nnnn"; # header contents: this was added to the traditional list of template files $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'header_toc_template' : 'header_template'}), $toc ? 1 : $params{page}); # complete header $result.="nnnn"; # begin body $result.="nnnn"; # now the body contents: start with top part $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'top_toc_template' : 'top_template'}), $toc ? 1 : $params{page}); # add navigation, if necessary $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'nav_toc_template' : 'nav_template'}), $toc ? 1 : $params{page}) if exists $options->{$toc ? 'nav_toc_template' : 'nav_template'}; # include data (for TOCs, make sure not to add a standard TOC if the tree applet is used # - this should be more generic in case users use other methods ...) $result.=$toc ? $result=~/_toc() : $params{data}; # add bottom navigation, if necessary $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'nav_toc_template' : 'nav_template'}), $toc ? 1 : $params{page}) if exists $options->{$toc ? 'nav_toc_template' : 'nav_template'}; # finally, add the bottom part $result.=$me->_processTemplate(join('/', $tdir, $options->{$toc ? 'bottom_toc_template' : 'bottom_template'}), $toc ? 1 : $params{page}); # close the body $result.="nnnn"; # and complete the page $result.="nnnn"; # build file name my $filename=join('', "$options->{targetdir}/$options->{prefix}-", (fileparse($template, qr(.+))), "-$params{page}$options->{suffix}"); warn "= PAGE SUPPLEMENT =====> $filenamen"; # write file open(SUPPFILE, ">$filename") or die qq( Could not open output file "$filename": $!.n); print SUPPFILE $string; close(SUPPFILE); } }Requirements:· Perl Requirements: · Perl
PerlPoint::Template::TT2 Related Software