# How to create a publication template

### What is a publication template?

A publication template serves as a blueprint for organizing and displaying data from the Product Information Management (PIM) system. It specifies the layout and style in which product information will appear, ensuring consistency across publications. With the help from the render engine, a dynamic file will be generated and populated with the relevant entity data.

### Creating a publication template

To create a new publication template, head to the publication page. You can do this by clicking 'Publication' in the top menu.

<figure><img src="/files/F31aMwM9MYzqoVDlVtEa" alt="The publication page"><figcaption><p>The publication page</p></figcaption></figure>

Navigate to the 'Publication template' page, either by clicking the button in the publication management overview or in the side-menu.

When you are on the 'Publication templates'-page, you can either import a template or create a new one.

Click 'Create publication template' in the top right corner.

<figure><img src="/files/t163nED4tQ5bqQApgl0e" alt="The publication template overview"><figcaption><p>The publication template overview</p></figcaption></figure>

The template needs a type. You can choose between 'Data' and 'PDF'.

The 'Data'-type lets you easily integrate with design tools like Adobe InDesign. Alternatively, 'PDF' templates give you plenty of design choices. Select the one that fits your specific needs.

<figure><img src="/files/MfaRfJ2tveADl9ZD6KrE" alt="The publication template settings"><figcaption><p>The publication template settings</p></figcaption></figure>

Give it a name and, if you need it, an external reference. Click 'Create' when you are all set and done.

When you click 'Create', new fields will show up. [You can learn more about the settings here](/reference/publication/publication-template/publication-template-details.md).

### What should I use?

When choosing what kind of publication template to create, consider its purpose and how it will be used. Here's a simple way to decide:

**For sharing data**: If your goal is to send data to other programs or systems for further analysis or processing (eg EasyCatalog in Adobe InDesign), it's best to use the 'Data' type as it is designed for data exchange, as it allows you to specify the data format you want to use, making it easier for other systems to read and process the information you provide. [You can read more about how to set up publications with EasyCatalog here](/tutorials/guides/how-to-use-publications/how-to-set-up-easycatalog-with-publications.md).

**For direct viewing**: On the other hand, if you want to create a document that is ready to view or print, such as a report or a brochure, a PDF format is the way to go. A PDF captures the layout and design of your document accurately, ensuring that it looks the same on any device.

Simply put, choose 'Data' for data sharing and 'PDF' for creating final documents ready for presentation.

### Using the designer

After specifying the settings for the template, you can start designing how the data should be displayed in the designer.

To access the designer, head out to the 'Publication templates'-page, hover over the template you just created, and click the <i class="fa-eye">:eye:</i>-icon to access the designer.

<figure><img src="/files/qWmhD6Xsxqr0wRSGkmNx" alt="The icon that will open up the designer"><figcaption><p>The icon that will open up the designer</p></figcaption></figure>

Inside the designer you will be met with a few different things. Let us break it down.

On the left hand side, you will see a editor with two tabs: 'HTML' and 'Data'. The 'HTML'-tab is where you write HTML, CSS and the language chosen as the rendering engine (Razor, Liquid or XSLT).

The 'Data'-tab is where you can see the data accessible to the editor.

<figure><img src="/files/3r9NIpT8eJxSaPnWPKYK" alt="Inside the publication template designer"><figcaption><p>Inside the publication template designer</p></figcaption></figure>

On the right there are two tabs: 'Preivew' and 'Settings'.

'Preview' is where the generated result will be shown. The preview will depend on what type of data type your template uses. If it is PDF, a PDF will be shown, however, if it is 'Data', XML will be shown.

'Settings' is where you can specify what entity data you want to be able to work with. You can search and select the entites through the 'Entities to use'-field. Notice how the data inside the 'Data'-tab on the left changes accordingly.

<figure><img src="/files/wT6Kn8O6KbqBr7iHgAmP" alt="The settings tab inside the designer"><figcaption><p>The settings tab inside the designer</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.struct.com/tutorials/guides/how-to-use-publications/how-to-create-a-publication-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
