FileTemplate

FileTemplate["file"]

yields a TemplateObject expression that represents a file template to be applied using functions like TemplateApply.

FileTemplate[src]

uses File[], URL[], or CloudObject[] as the specification for the file location.

FileTemplate[form,args]

yields a TemplateObject with arguments, suitable for cloud deployment or other evaluation.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Loading a template file from disk:

Applying to a FileTemplate:

Saving a template to disk:

The type of template to use is by default determined by the extension:

Evaluate $TemplatePath to see where FileTemplate is searching for templates:

Scope  (3)

File is fully supported:

Templates can be hosted in the Wolfram Cloud:

URL can be used to fetch templates:

URL can be directly used by TemplateApply:

Options  (2)

InsertionFunction  (1)

Specify a function to convert arguments before they are inserted:

You can use a string to specify an export format:

CombinerFunction  (1)

Specify a different way to combine parts of templates:

Properties & Relations  (1)

If you deploy a template with data, each time you visit it TemplateApply will render the content again:

Wolfram Research (2014), FileTemplate, Wolfram Language function, https://reference.wolfram.com/language/ref/FileTemplate.html.

Text

Wolfram Research (2014), FileTemplate, Wolfram Language function, https://reference.wolfram.com/language/ref/FileTemplate.html.

CMS

Wolfram Language. 2014. "FileTemplate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FileTemplate.html.

APA

Wolfram Language. (2014). FileTemplate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileTemplate.html

BibTeX

@misc{reference.wolfram_2021_filetemplate, author="Wolfram Research", title="{FileTemplate}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/FileTemplate.html}", note=[Accessed: 07-December-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_filetemplate, organization={Wolfram Research}, title={FileTemplate}, year={2014}, url={https://reference.wolfram.com/language/ref/FileTemplate.html}, note=[Accessed: 07-December-2021 ]}