Template Variables and additional document fields
PubKit uses a set of template variables (TV) with fixed names, written into the include files, for some basic features. You can add in your own TVs, following the example in the Event class. You can also expand the range of built-in document fields to be handled.
The fixed name TVs are:
- pkDate - custom date on item, e.g. dateline for news item, date an event begins.
Date TV using Unixtime widget - pkDateTo - custom date for inclusive range, naming last day on which item is to be displayed. Unpublish day will be one day after this.
Date TV using Unixtime widget - pkPreviewFlag - forces Published flag to zero, selects preview template for previwing item.
Checkbox with one option, evaluating to 1 or 0
The rich-text element used for input can have any name (usually it's pkRichContent). Previously you had to have placeholder [+newsBody+] as its default content, but this has been superseded. (It didn't work with the latest version of TinyMCE. The new version, taking rendered output and creating a placeholder from it, is in any case more transparent and robust).