Difference between revisions of "Template Snippet"

From DocDataFlow
Jump to: navigation, search
(Created page with "== Snippets == A snippet is a template file. It is a text file with a .snippet file name extension. Inside the template file, there is a mix of boilerplate text and placehol...")
(No difference)

Revision as of 20:09, 26 December 2013

Snippets

A snippet is a template file. It is a text file with a .snippet file name extension.

Inside the template file, there is a mix of boilerplate text and placeholders. An example: there could be a template maindoc.xhtml.snippet which could contain

<html>
$$HEAD$$
$$BODY$$
</html>

The $$HEAD$$ and $$BODY$$ would be placeholders which will be replaced by the text for some lower-level granules.

This is only a sample: placeholders can take many shapes and forms, and the use of $$ as prefix/suffix is just what's used as the default placeholder pattern in Crawler.