---
title: "How to create a properties fragment"
source: https://dev.pageseeder.com/get_started/tutorials/how_to_create_a_properties_fragment.html
last_updated: 2026-09-05T17:35:41+10:00
tokens: ~745
---

# How to create a properties fragment

| Property | Value |
| --- | --- |
| Skills required: | XML |
| Time required (minutes): | 15 |
| Intended audience: | Developer |
| Difficulty: | Easy |
| Category: | Document |

## Objective

PSML supports a special class of fragments known as [properties fragments](../../psml/elements/element_properties-fragment.md). These name/value pairs can be used to store information such as metadata. This tutorial will explain how they can be implemented.

## Tutorial

### Introduction

By default, [sections](../../reference/glossary/section.md) in PageSeeder documents use the PSML format, however editing other formats and structures are also supported through built-in editors.

Because it is not possible to change the default document type, this exercise requires the use of a custom document.

> **Note:** To insert a new section into an existing document, export the document and use a text or XML editor to insert the new section in the PSML file.

### Create a new document type

This step can be skipped if the documents to be changed already belong to a custom [document type](../../reference/glossary/document_type.md).

Otherwise, follow the tutorial [How to create a new document type](create_a_new_document_type.md).

### Create a new section with \<properties-fragment\>

Edit the `document-template.psml` file for the specific document type from the **Template configuration** administration page. For example 'movie\_information' created in the previous tutorial above.

![Template configuration page – Edit template](/content/get_started/tutorials/../../images/tutorials/template_config_page_edit_template_v60000.webp)

Insert a new [\<section\> element](../../psml/elements/element_section.md) containing a [\<properties-fragment\> element](../../psml/elements/element_properties-fragment.md) as shown below:

```xml
<document type="movie_information" level="portable"
          xmlns:t="http://pageseeder.com/psml/template">

  <section id="title">
    <fragment id="1">
      <heading level="1"><t:value name="ps.title"/></heading>
    </fragment>
  </section>
 
  <section id="details">
    <properties-fragment id="3">
      <property name="directed_by" title="Directed by"/>
      <property name="film_genre" title="Film genre" multiple="true"/>
      <property name="classification" title="Classification"/>
      <property name="opening_date" title="Opening date" datatype="date"/>
      <property name="related_films" title="Related films" datatype="xref"/>
    </properties-fragment>
  </section>

</document>
```

### Configure the editor

Where properties are a big component of the data, customizing the editor can improve productivity or data quality. To learn more about this topic, see the [How to configure a custom properties editor](how_to_configure_a_custom_properties_editor.md) tutorial or the [PSML properties editor](../../guide/configuration/psml/psml_properties_editor.md) reference documentation.

