internal package Foswiki::Configure::TemplateParser::SimpleFreeMarker

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

parse( $templateText, \%keyValues )

Example:

$parser->parse( $text, { 'depth' => $depth, 'headline' => $headline, });

FreeMarker macros like ${depth} are substituted with the value of $depth.

See http://freemarker.org/docs/ref_directive_if.html

Not implemented: <#elseif statement>

Not implemented: nested if statements

See http://freemarker.org/docs/ref_directive_list.html

Not implemented: sequence notation: ["winter", "spring", "summer", "autumn"]

Not implemented: <#break>

See http://freemarker.org/docs/ref_directive_assign.html

Currently only implemented:

<#assign name> capture this </#assign>

_handleQueryExpressions($key, $query, \%keyValues) -> $text

Only implemented:

replace (string): replace text string by another text string syntax: text?replace("from", "to")

join (array): join elements from a list syntax: list?join(",")

_getValue( $key, \%keyValues ) => $value

Gets the value from the $keyValues hash. Dies if the key was not found - see http://fmpp.sourceforge.net/freemarker/app_faq.html#faq_picky_about_missing_vars ("Why is FreeMarker so picky about null-s and missing variables, and what to do with it?")

cleanupTemplateResidues( $templateText )

Removes remaining template rubble.

This topic: System > WebHome > ReferenceManual > DeveloperDocumentationCategory > PerlDoc
Topic revision: 19 Apr 2011, ProjectContributor
 
This site is powered by FoswikiCopyright &© by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding BACCHUS Wiki? Send feedback