Create a fragment
This documentation relates to Experience Orchestration, the name of an internal program focused on developing several new capabilities for the Contentful platform. It is not a standalone new product. The materials shared here are intended exclusively for customers and partners participating in the Design Partner Program and reflect our current direction at this stage of development; as the program continues to evolve toward general availability, details may change. These materials are confidential and not for onward distribution.
A fragment is a reusable building block that is an instance of a component and contains both content and presentation. A fragment can be set up to power a navigation bar or a promo block, for example.
A marketer can create a fragment from a component, add content to it, and configure its design properties to further reuse it across experiences, templates, components, and other fragments.
In the Fragments page
To create a fragment from the Fragments page:
Log in to the Contentful web app.
In the Create area of the navigation panel, click Experiences and select All fragments.
Click + Create new fragment.
In the Name field, enter a custom name for your fragment.
In the Root component field, select a component that you would like your fragment to be based on.
Optional: In the Description field, add a custom description for your fragment.
In the Folder field, add your fragment to a folder by either selecting an existing folder or clicking + Create new folder to add a new one.
Click Create. Your fragment has been created based on the selected component. You can set it up by adding content and configuring its design properties.
In the experience
You can create a fragment from one component or a tree of components and/or fragments that are added to a slot in an experience. The newly created fragment will replace the component it’s created from within the current experience.
To create a fragment in the context of an experience:
Open the required experience. The experience editor is displayed.
In the left sidebar, add one or multiple components and fragments to a slot as desired.
Click on the desired component and select Save as fragment.
In the Save as fragment window, enter a custom name for your fragment and add a description.
Click Save. Your fragment has been created.