Note: An alternative skin, TW4MW (work in progress), is available from the user preferences.

TiddlyTemplatingMacro

TiddlyWiki Community Wiki

Jump to: navigation, search
Name: TiddlyTemplatingMacro
Author : jayfresh
URL : #TiddlyTemplatingMacro
Description : Renders a template and saves the output to a local file
Version : 3

The TiddlyTemplating macro lets you create arbitrary output files and folder structures. The main usage documentation, with examples, is on the TiddlyTemplating page.

TiddlyTemplatingMacro provides the following macro:

[edit] Usage

<<TiddlyTemplating template|template:tiddlerName [filter:filterString] [wikitext:true] [fileName:fileName]>>

Parameters:

  • template - the name of the tiddler to be used as a template
  • filter (optional) - a valid filterString to collect a set of tiddlers for use with the template
  • wikitext (optional) - if true, wikifies the template as TiddlyWiki wikitext instead of using the TemplateFormatter (useful if you are managing content using tiddlers and want to use wikitext)
  • fileName (optional) - the name the file to be saved (can include path); if not set, defaults to "output.txt"

[edit] Description

Running the TiddlyTemplating macro initiates two phases:

  1. The template provided is rendered as described in the TemplatePlugin documentation
  2. The resulting string is saved to the file specified in the path parameter

[edit] Dev notes

This macro creates a button that triggers a template-and-publish process, with worker functions inside the library doing almost all the work. The simpler functionality of templateTiddlers will be wrapped into this library as there is a great deal of overlap; it has previously been developed in parallel.

Personal tools