Difference between revisions of "Template Snippet"
From DocDataFlow
Line 1: | Line 1: | ||
== Snippets == | == Snippets == | ||
− | A [[ | + | A snippet is a [[Template|''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 | 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 |
Latest revision as of 18:49, 29 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.