---
title: "Generate Backend Preview Template Command"
manual: "Content Blocks"
version: "main"
permalink: "https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:command-generate-backend-preview-template@main"
source: "Commands/GenerateEditorPreviewTemplate/Index.rst"
rendered: "2026-09-22T14:15:39+00:00"
---

# Generate Backend Preview Template Command {#command-generate-backend-preview-template}

The command `content-blocks:generate:editor-preview` generates a
backend backend preview Fluid template for the given Content Block and writes it
to the `templates/backend-preview.fluid.html` file inside the Content
Block directory. The file will not be overwritten unless `--force` is
provided.

## Arguments {#arguments}

-   **content-block**

    -   *Required:* true
    -   *Type:* string

    The Content Block to generate the backend preview template for (e.g. `vendor/name`).

## Options {#options}

-   **force**

    -   *Shortcut:* f
    -   *Type:* bool

    Override a existing backend preview template file.

Generate a backend preview template for Content Block `example/my-block`:

```bash
vendor/bin/typo3 content-blocks:generate:backend-preview example/my-block
```

Override a existing backend preview template:

```bash
vendor/bin/typo3 content-blocks:generate:backend-preview example/my-block --force
```
