> For the complete documentation index, see [llms.txt](https://docs.liveblog.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liveblog.pro/readme/more-tools/free-types-manager.md). Agents can also search and read this documentation through its [MCP server](https://docs.liveblog.pro/~gitbook/mcp).

# The Free Types Manager

A free type is a post form your organisation designs itself: a match event, an election result, a fact check. Writers pick it from **Choose post type** in the editor, fill in the fields, and the post always comes out with the same layout. This page shows how to create, change and delete free types, and how a template works.

To use a free type when writing a post, see [Post types and free types](https://docs.liveblog.pro/readme/writing-posts/post-types-and-free-types.md).

The Free Types Manager depends on your plan. If your plan does not include it, the screen says so and you cannot create free types.

## Who can use it

* Administrators can create, edit and delete free types.
* Super Editors can create and edit free types, but they have no delete button.
* Editors and Contributors do not have the Free Types Manager in their menu. They can still use every free type in the editor.

Free types belong to your organisation. Every blog of the organisation offers the same list.

## Open the Free Types Manager

Open the main menu and click **Free Types Manager** under **Admin tools**. The **Free types manager** screen lists the free types of your organisation in alphabetical order.

<figure><img src="https://3069567940-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiE9YRT74G1RgbPMObBM4%2Fuploads%2Fgit-blob-5f9b9d77465c916736757cca874e28ddb6e0246a%2Flist.png?alt=media" alt="The Free types manager screen with the Create Free Type button, an information box and six free types, each with an edit and a delete icon, numbered" width="1499"><figcaption><p>The Free types manager</p></figcaption></figure>

1. **Create Free Type** opens an empty dialog for a new free type.
2. The pencil (**Edit**) opens a free type to change its title or template.
3. The bin (**Delete**) removes a free type.

The information box at the top links to the technical documentation of the template syntax. Click the **X** to close it.

## Create a free type

{% stepper %}
{% step %}

### Open the dialog

Click **Create Free Type**. The **Create New Free Type** dialog opens.
{% endstep %}

{% step %}

### Give it a title

Type a title in **Free Type Title**, up to 24 characters. Writers see this title in the **Choose post type** menu, so make it say what the post is. The title must be different from the titles of the other free types.
{% endstep %}

{% step %}

### Write the template

Paste or type the template in **Free Type Template**. The template is the layout of the post with a placeholder for every value the writer fills in. See [How a template works](#how-a-template-works).
{% endstep %}

{% step %}

### Save

**Save** stays greyed out until both fields are filled in. Click it. The new free type is added to the list and to the **Choose post type** menu of every blog.
{% endstep %}
{% endstepper %}

<figure><img src="https://3069567940-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiE9YRT74G1RgbPMObBM4%2Fuploads%2Fgit-blob-b7210e24538427c492845e748e00a3bfe5ba522a%2Fcreate-dialog.png?alt=media" alt="The Create New Free Type dialog with the title Quick fact and a short template in the template box, and the Cancel and Save buttons" width="503"><figcaption><p>A new free type in the Create New Free Type dialog</p></figcaption></figure>

Live Blog checks the template when you save:

* If it has no variable, you get "Template must contain at least one variable! Check the documentation for further information".
* If another free type already has the title, you get "Free types titles must be unique".
* If the template is not valid HTML, the error starts with "The provided HTML template is not valid".

To give up, click **Cancel** or the **X** in the top right corner. Nothing is saved.

## How a template works

You do not need to be a developer to read a template, but writing one from scratch takes some HTML. A template has three parts:

* **The layout**, in HTML: boxes, headings, lists. It is the same for every post of this type.
* **Variables**: the places where the writer's values go. A variable is a name that starts with a dollar sign, such as `$headline`. Each variable becomes a field in the editor form, and its value takes its place in the published post.
* **Styles**, optional: a `<style>` block at the top with the colours, sizes and spacing. It is published with every post of this type.

### A worked example

This is the **Quick fact** free type from the screenshot above. It shows one big number, what it counts and where it comes from.

```html
<style>
.quick-fact .quick-fact__number{display:block;font-size:32px;font-weight:700}
.quick-fact .quick-fact__source{display:block;font-size:12px;color:#7b8794}
</style>
<div class="quick-fact">
<label hide-render>Number</label>
<input name="$big_number" class="quick-fact__number" necessary="true" maxlength="12"/>
<label hide-render>What it counts</label>
<input name="$meaning" necessary="true" maxlength="120"/>
<label hide-render>Source</label>
<input name="$fact_source" class="quick-fact__source" maxlength="140"/>
</div>
```

Line by line:

* `<input name="$big_number" .../>` makes a one-line text field. Whatever the writer types replaces it in the published post.
* `necessary="true"` makes the field required: the form shows **Required** until it is filled in.
* `maxlength="12"` limits the field to 12 characters.
* `<label hide-render>Number</label>` is the label above the field in the form. `hide-render` means it is shown in the form only, not in the published post.
* `class="quick-fact__number"` connects the value to a style rule, here a large bold number.

In the editor, a writer who picks **Quick fact** gets three fields labelled Number, What it counts and Source. The published post shows the number in large type, the text under it, and the source in small grey letters.

### What else a template can do

The building blocks below can be used in any free type. The easiest way to learn them is to open a free type of your organisation with the pencil and read its template.

| In the template                                            | In the editor form                                                    | In the published post                                 |
| ---------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------- |
| `<input name="$x"/>`                                       | A line of text                                                        | The text                                              |
| `number="true"` on a text field                            | The field accepts only a number (**Needs to be number!**)             | The number                                            |
| `tandem="$y"` on a text field                              | Filling in `$y` makes this field required                             | The text                                              |
| `compulsory="y"` on a text field                           | One of the two fields must be filled in (**One of these is needed!**) | The text                                              |
| `<input select="$x" options="Goal,Booking,Substitution"/>` | A drop-down list with those choices                                   | The chosen value                                      |
| `<input image="$x"/>`                                      | An image upload (**Drop it here**, **or Select from computer**)       | The picture                                           |
| `<input link="$x"/>`                                       | A field for a web address                                             | Nothing by itself; use the value with `@x`, see below |
| `<input checkbox="$x" type="checkbox"/>`                   | A check box                                                           | Nothing by itself; use it with `@word? x`, see below  |
| `<input embed="$x"/>`                                      | A box for embed code, for example a chart                             | The embed                                             |
| `<input wrap-link="$x"/>`                                  | A field for a web address                                             | The whole post becomes a link to that address         |
| `<li>` with `$rows[0].field` inside                        | A list of rows with **+** and **-** buttons                           | One list item per row                                 |

You can also use a value somewhere else in the layout, for example in a class name or a link:

* `@x` puts the value of `$x` there. `href="@source_url"` makes a link to the address typed in a `link` field.
* `@word? x` puts `word` there only when `$x` is filled in or ticked. Use it to switch on a style, for example a red badge when a check box is ticked.
* `@background-image: x` sets an uploaded picture as the background of an element.

Some ideas for free types you can build with these blocks:

* A **Match event** can turn the event chosen in a drop-down list into a colour: green for a goal, red for a sending-off.
* An **Election result** can draw a bar for each party, as wide as its share of the vote.
* A **Weather warning** can colour the whole card by warning level and turn it into a link to the full warning.
* **By the numbers** and **Profile card** types can use lists of rows, so writers add as many figures or facts as they need.

### Ready-made examples

You do not have to start from scratch. Ready-made free types are in the Live Blog code repository, in the folder [custom-post-types](https://github.com/liveblog/liveblog/tree/master/custom-post-types). You can use them: copy a template into the Free Types Manager and keep its name, because its styles depend on it.

The examples were written for the Liveblog 3 Default SEO Theme and for Live Blog 3.4, and they are not shown in the Liveblog 3 AMP Theme. Try one on a test blog before you use it on a live one.

### Limits to know about

{% hint style="warning" %}
A variable name keeps the kind of value it was first saved with, across all free types. Once a post has stored `$source` as text, another free type that uses `$source.name` (a group of values under the same name) cannot be saved in a post: publishing fails with a server error. Give each variable a name you have not used for something else, such as `$source_url` instead of reusing `$source`.
{% endhint %}

* Inside a list row, a value used with `@` always shows the value of the first row. Only the `$` fields follow their own row.
* `hide-render` only works on an element that has no element of the same tag inside it. It hides everything up to the first closing tag of that kind. Use it on labels, not on a `<div>` that holds other `<div>` elements.
* Do not use the DOCTYPE, BODY and HEAD tags, and close every tag you open.

## Edit a free type

Click the pencil next to a free type. The dialog opens with the title and the template filled in. Its heading still reads **Create New Free Type**, but you are changing the existing free type. Change what you need and click **Save**.

<figure><img src="https://3069567940-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiE9YRT74G1RgbPMObBM4%2Fuploads%2Fgit-blob-c26f766250749813c5c9410248f225406e9bfe8e%2Fedit-dialog.png?alt=media" alt="The dialog open on the Match event free type, with its title and the beginning of its template" width="503"><figcaption><p>Editing the Match event free type</p></figcaption></figure>

Posts that are already published keep the layout they were published with. The new template applies to posts published after the change, and to older posts when someone edits and updates them.

{% hint style="warning" %}
Posts remember their free type by its title. If you rename a free type, the posts published with it can no longer be opened in the form for editing. Live Blog is meant to warn you when a free type is used in posts, but the warning does not always appear. Treat every free type that writers have used as in use.
{% endhint %}

## Delete a free type

Click the bin next to the free type. Live Blog asks "Are you sure you want to remove this free type?". Click **OK** to delete it, or **Cancel** to keep it.

<figure><img src="https://3069567940-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiE9YRT74G1RgbPMObBM4%2Fuploads%2Fgit-blob-0aefb86d9e2d239603c1c8d0a4c1cad646d455be%2Fdelete-confirm.png?alt=media" alt="The Confirm dialog asking Are you sure you want to remove this free type, with Cancel and OK" width="624"><figcaption><p>The confirmation before a free type is deleted</p></figcaption></figure>

{% hint style="warning" %}
Deleting a free type cannot be undone. It disappears from the **Choose post type** menu. Posts already published with it stay on the blogs, but they can no longer be edited in the form.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.liveblog.pro/readme/more-tools/free-types-manager.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
