internal package Foswiki::Configure::TemplateParser

parser ($parserId) -> $parser

Static parser factory. Param $parserId must point to existing TemplateParser subclass!

Sets the skin of the parser

parse( $templateText, \%keyValues )

To be implemented by subclasses.

_cleanupTemplateResidues( $templateText )

To be implemented by subclasses.

readTemplate( $name ) => $text

Reads the contents of template file with name $name, where the name is either: - 'page' - 'main' - 'section'

Example: my $text = Foswiki::readTemplate('section');

commenting out, this seems just 'to work' $text =~ s#/\*.*?\*/##g; $text =~ s#\s*//.*$##gm if ( $resource =~ /\.js$/ ); # $text =~ s/\t/ /g; $text =~ s/[ ]+$//gm; $text =~ s/^\s+//gm; $text =~ s/ +/ /g; $text =~ s/\s*\n/\n/gs;
Topic revision: r1 - 19 Apr 2011, ProjectContributor
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback