Document categories, types and presets: organize templates
Describes Document Creator 0.10.0.
Categories sort templates and documents into broad kinds, and each category has its own types for finer sorting. A category can also hold presets: saved lists of templates that make up one combined document.
Where to find it
In the admin sidebar, open Document Creator, then Categories, or go to /admin/document-creator/categories. You need the Document Creator permission. Categories are stored in PhoenixKit, so this page works without a Google connection.
Categories and types for documents.
Categories
The left column lists the categories. Click one to open it: its types show in the right column and its presets below. The address keeps the chosen category, so a reload or the Back button keeps it open.
- New: opens New Category.
- Drag a category by the handle on its left to change the order.
- The … menu on a row holds Edit and Trash.
New Category and Edit Category have Name (required) and Description. With multiple languages enabled, language tabs above the form let you fill them in per language. Save returns to the category with Category saved.
Trashing and deleting a category
Trash moves the category to the trash at once, without asking. Its types go with it, and so do the templates filed under it or its types: they are marked as deleted. Documents are not touched. The page confirms: Category trashed. Its types and templates have also been moved to trash.
Once something is in the trash, Active and Trash tabs appear above the list. In Trash, a category’s menu has:
- Restore: brings the category back, with the types and templates its trashing took along. Types and templates you had trashed yourself before that stay trashed.
- Delete Forever: removes the category and all its types for good. Templates and documents filed under it lose that category. This runs as soon as you click, without a confirmation.
Edit Category also has a Danger Zone with Delete Forever, which asks “Are you sure? This cannot be undone.” first.
Types
With a category open, the right column lists its types. Each shows how many published templates are filed under it; hover over the number to read “3 templates” and so on.
- New Type: opens New Type, with Name (required), Description and Category. Changing the category moves the type to another one.
- Drag a type by its handle to change the order.
- The … menu holds Edit and Trash. Trashing a type also moves its templates to the trash, with Type trashed. Its templates have also been moved to trash.
- In the types’ Trash tab, Restore brings a type back with the templates it took along, and Delete Forever removes it for good, without asking. Templates and documents of that type lose it.
- Standard groups creates a fixed set of nine types in this category, in a fixed order, after a confirmation. Types that already have those names are only moved into place, never doubled. The names are built into the module.
On the Templates page, types are called groups.
Presets
A preset is a saved list of templates, in order, that together make up one document. The Presets card shows the open category’s presets, grouped by type, with presets that have no type last under Untyped. Each row shows the number of sections, and a warning badge such as 1 broken template when a section points to a template that is missing or trashed.
New preset opens New Preset:
- Name and Description.
- Document type: one of the category’s types, or Untyped.
- Sections: Add section adds a row. In each row, pick a template from — pick a template —; only published templates filed under this category are offered. Each variable of the chosen template gets a text box for a default value. Drag rows by the handle to reorder them, and remove one with the × button. A row whose template is gone shows (missing or trashed template) with a warning sign.
Save returns to the category with Preset saved. The preset’s … menu has Edit and Delete, which asks “Delete this preset permanently?” first.
What it doesn’t do
- The admin pages don’t create a document from a preset. Presets are read by code in the host application.
- A document has one category and one type; only templates can be in several categories.
- Trashing a category doesn’t trash the documents in it.