Previewing Content Fragments previewing-content-fragments
Content Fragments can be used for both headless delivery and page authoring. As the fragments are solely content, without formatting, reviewing them can be more challenging. So multiple methods of previewing your fragments, in a variety of scenarios, are provided.
There are several methods available for Content Fragments, accessible from the Console Fragments console and editor. The console and editor described in this section have been developed for headless content delivery (though they can be used for all scenarios).
You can preview your fragment:
-
using the Preview URL pattern
-
by publishing to, and unpublishing from, the Preview instance
Of course, you can also view your fragment in the Content Fragment editor.
- use of the Assets console for managing Content Fragments
- use of the original Content Fragment editor,
- using Content Fragments for page-authoring.
Preview URL pattern preview-url-pattern
The Content Fragment editor provides authors with the option to preview their edits in an external frontend application.
To use this feature, you first need to:
-
Work with your IT team to set up the external frontend application that will render the Content Fragment by consuming its JSON output.
-
When the external frontend application is set up, the Default Preview URL Pattern must be defined as a property of the appropriate Content Fragment Model.
The preview URL should follow this pattern:
https://<preview_url>?param=${expression}
Available expressions are:
${contentFragment.path}
${contentFragment.model.path}
${contentFragment.model.name}
${contentFragment.variation}
${contentFragment.id}
When the URL has been defined, the Preview button is active in the top toolbar of the editor. You can select this button to launch the external application (in a separate tab) to render the Content Fragment.
Preview Instance preview-instance
You can Publish, and Unpublish, your fragment to your Preview Service (as well as to your Publish instance).
You can publish your fragment from either the editor, or the console.
See:
-
Publishing and Previewing a Fragment for full details.
-
Unpublishing a fragment for full details.