Variations - Authoring Fragment Content

Variations are a significant feature of AEM’s content fragments, as they allow you to create and edit copies of the master content for use on specific channels, and/or scenarios, making headless content delivery even more flexible.

NOTE

Content Fragments are a Sites feature, but are stored as Assets.

There are two editors for authoring Content Fragments. This section covers the original editor, primarily accessed from the Assets console. See the Sites documentation, Content Fragments - Authoring, for details of the new editor (primarily accessed from the Content Fragments console).

From the Variations tab you can:

Perform a range of other actions depending on the data-type being edited; for example:

CAUTION

After a fragment has been published and/or referenced, AEM will display a warning when an author opens the fragment for editing again. This is to warn that changes to the fragment will affect the referenced pages as well.

Authoring your Content

When you open your content fragment for editing, the Variations tab is open by default. Here you can author the content, for Master or any variations you have. The structured fragment contains various fields, of various data-types, that were defined in the content model.

For example:

full screen editor

You can:

  • Make edits to your content directly in the Variations tab; each data type provides different editing options, for example:

  • Assign Tags to the current variation; the tags can be added, updated and removed

    • Tags are particularly powerful when organizing your fragments as they can be used for content classification and taxonomy. Tags can be used for the purpose of finding content (by tags) and applying bulk operations.

      • Searches for a tag will return the fragment, with the tagged variation highlighted.
      • Variation tags can also be used to group variations for a specific Content Delivery Network (CDN) profile (for CDN caching), instead of using the variation name.

      For example, you can tag relevant fragments as “Christmas launch” to allow browsing only these as a subset, or to copy them for use with another future launch in a new folder.

    NOTE

    Tags can also be added (to the Master variation) as part of the Metadata

  • Create and manage variations of the Master content.

Full Screen Editor

When editing a multi-line text field you can open the full screen editor; tap or click within the actual text, then select the following action icon:

full screen editor icon

This will open the full screen text editor:

full screen editor

The full screen text editor provides:

Actions

The following actions are also available (for all the formats) when the full-screen editor (that is, multi-line text) is open:

Formats

The options for editing multi-line text depend on the format selected:

The format can be selected when the full-screen editor.

Rich Text

Rich text editing lets you format:

  • Bold
  • Italic
  • Underline
  • Alignment: left, center, right
  • Bulleted list
  • Numbered list
  • Indentation: increase, decrease
  • Create/Break hyperlinks
  • Paste Text/from Word
  • Insert a table
  • Paragraph style: Paragraph, Heading 1/2/3
  • Insert asset
  • Open the full-screen editor, where the following formatting options are available:
  • Insert Content Fragment; available when your Multi line text field is configured with Allow Fragment Reference.

The actions are also accessible from the full-screen editor.

Plain Text

Plain Text allows for rapid entry of content without formatting or markdown information. You can also open the full-screen editor for further actions.

CAUTION

If you select Plain Text you might lose any formatting, markdown and/or assets that you have inserted in either Rich Text or Markdown.

Markdown

NOTE

For full information see the Markdown documentation.

This lets you format your text using markdown. You can define:

  • Headings
  • Paragraphs and Line Breaks
  • Links
  • Images
  • Block Quotes
  • Lists
  • Emphasis
  • Code Blocks
  • Backslash Escapes

You can also open the full-screen editor for further actions.

CAUTION

If you switch between Rich Text and Markdown you might experience unexpected effects with Block Quotes and Code Blocks, as these two formats can have differences in how they are handled.

Fragment References

If the Content Fragment Model contains Fragment References, your fragment authors may have additional options:

Fragment References

Edit Content Fragment

The option Edit Content Fragment will open that fragment in a new editor tab (within the same browser tab).

Selecting the original tab again (for example, Little Pony Inc.), will close this secondary tab (in this case, Adam Smith).

Fragment References

New Content Fragment

The option New Content Fragment will allow you to create a completely new fragment. To achieve this a variation of the create content fragment wizard will open in the editor.

You will then be able to create a new fragment by:

  1. Navigating to, and selecting the required folder.
  2. Selecting Next.
  3. Specifying properties; for example Title.
  4. Selecting Create.
  5. Finally:
    1. Done:
      • returns (to the original fragment)
      • references the new fragment
    2. Open:
      • references the new fragment
      • opens the new fragment for editing in a new browser tab

Viewing Key Statistics

When the full-screen editor is open, the action Text Statistics will display a range of information about the text.

For example:

statistics

Uploading Content

To ease the process of authoring content fragments you can upload text, prepared in an external editor, and add it directly to the fragment.

Summarizing Text

Summarizing text is designed to help users reduce the length of their text to a predefined number of words, while keeping the key points and overall meaning.

NOTE

On a more technical level the system keeps the sentences which it rates as providing the best ratio of information density and uniqueness according to specific algorithms.

CAUTION

The content fragment must have a valid language folder (ISO Code) as an ancestor; this is used to determine the language model to be used.

For example, en/ as in the following path:

  /content/dam/my-brand/en/path-down/my-content-fragment

CAUTION

English is available out-of-the-box.

Other languages are available as Language Model Packages from Software Distribution:

  1. Select Master or the required variation.

  2. Open the full-screen editor.

  3. Select Summarize text from the toolbar.

    summarization

  4. Specify the target number of words and select Start:

  5. The original text is displayed side-by-side with the proposed summarization:

    • Any sentences to be eliminated are highlighted in red, with strike-through.
    • Click on any highlighted sentence to keep it in the summarized content.
    • Click on any non-highlighted sentence to have it eliminated.
  6. Select Summarize to confirm the changes.

  7. The original text is displayed side-by-side with the proposed summarization:

    • Any sentences to be eliminated are highlighted in red, with strike-through.
    • Click on any highlighted sentence to keep it in the summarized content.
    • Click on any non-highlighted sentence to have it eliminated.
    • The summarization statistics are shown: Actual and Target-
    • You can Preview the changes.

    summarization comparison

Annotating a Content Fragment

To annotate a fragment:

  1. Select Master or the required variation.

  2. Open the full-screen editor.

  3. The Annotate icon is available in the top toolbar. You can select some text if required.

    annotate

  4. A dialog will open. Here you can enter your annotation.

    annotate

  5. Select Apply on the dialog.

    annotate

    If the annotation was applied to selected text, then that text will remain highlighted.

    annotate

  6. Close the full-screen editor, annotations are still highlighted. If selected, a dialog will open so that you can edit the annotation further.

  7. Select Save.

  8. Close the full-screen editor, annotations are still highlighted. If selected, a dialog will open so that you can edit the annotation further.

    annotate

Viewing, Editing, Deleting Annotations

Annotations:

  • Are indicated by the highlight on the text, in both full-screen and normal mode of the editor. Full details of an annotation can then be viewed, edited, and/or deleted, by clicking on the highlighted text, which will re-open the dialog.

    NOTE

    A drop-down selector is provided if multiple annotations have been applied to one piece of text.

  • When you delete the entire text to which the annotation was applied, the annotation is deleted as well.

  • Can be listed, and deleted, by selecting the Annotations tab in the fragment editor.

    annotations

  • Can be viewed, and deleted, in Timeline for the selected fragment.

Inserting Assets into your Fragment

To ease the process of authoring content fragments you can add Assets (images) directly to the fragment.

They are added to the paragraph sequence of the fragment without any formatting; formatting can be done when the fragment is used/referenced on a page.

CAUTION

These assets cannot be moved or deleted on a referencing page, this must be done in the fragment editor.

However, formatting of the asset (for example, size) must be done in the page editor. The representation of the asset in the fragment editor is purely for authoring the content flow.

NOTE

There are various methods of adding images to the fragment and/or page.

  1. Position the cursor at the position you want to add the image.

  2. Use the Insert Asset icon to open the search dialog.

    insert asset icon

  3. In the dialog you can either:

    • navigate to the required asset in DAM
    • search for the asset in DAM

    Once located, select the required asset by clicking on the thumbnail.

  4. Use Select to add the asset to the paragraph system of your content fragment at the current location.

    CAUTION

    If, after adding an asset, you change format to:

    • Plain Text: the asset is completely lost from the fragment.
    • Markdown: the asset will not be visible, but will still be there when you return to Rich Text.

Inserting a Content Fragment into your Fragment

To ease the process of authoring content fragments you can also add another Content Fragment to your fragment.

They are added as a reference, in your current location in your fragment.

NOTE

This option is available when your Multi line text is configured with Allow Fragment Reference.

CAUTION

These assets cannot be moved or deleted on a referencing page, this must be done in the fragment editor.

However, formatting of the asset (for example, size) must be done in the page editor. The representation of the asset in the fragment editor is purely for authoring the content flow.

NOTE

There are various methods of adding images to the fragment and/or page.

  1. Position the cursor at the position you want to add the fragment.

  2. Use the Insert Content Fragment icon to open the search dialog.

    insert Content Fragment icon

  3. In the dialog you can either:

    • navigate to the required fragment in the Assets folder
    • search for the fragment

    Once located, select the required fragment by clicking on the thumbnail.

  4. Use Select to add a reference to the selected Content Fragment to your current content fragment (at the current location).

    CAUTION

    If, after adding a reference to another fragment, you change format to:

    • Plain Text: the reference is completely lost from the fragment.
    • Markdown: the reference will remain.

Inheritance

Inheritance is the mechanism where content can be automatically pushed from one fragment to another. Inherited fields, and variations, can be the product of Multi-Site Management.

You can cancel (then re-enable) the inheritance. Depending on the context, this can be available for a variation, or an individual field, if the fragment is part of a live copy.

A Content Fragment showing inheritance relationship

For example:

  • Cancel Inheritance

    Cancel Inheritance button

  • Re-enable Inheritance (if inheritance is already cancelled)

    Re-Enable Inheritance button

Managing Variations

Creating a Variation

Variations allow you to take the Master content and vary it according to purpose (if required).

To create a new variation:

  1. Open your fragment and ensure that the side panel is visible.

  2. Select Variations from the icon bar in the side panel.

  3. Select Create Variation.

  4. A dialog will open, specify the Title and Description for the new variation.

  5. Select Add; the fragment Master is copied to the new variation, which is now open for editing.

    NOTE

    When creating a new variation it is always Master that is copied, not the variation that is currently open.

    NOTE

    When you create a new variation, all Tags currently assigned to the Master variation are copied to your new variation.

Editing a Variation

You can make changes to the variation content after either:

  • Creating your variation.
  • Opening an existing fragment, then selecting the required variation from the side panel.

editing a variation

Renaming a Variation

To rename an existing variation:

  1. Open your fragment and select Variations from the side panel.

  2. Select the required variation.

  3. Select Rename from the Actions drop-down.

  4. Enter the new Title and/or Description in the resulting dialog box.

  5. Confirm the Rename action.

NOTE

This only affects the variation Title.

Deleting a Variation

To delete an existing variation:

  1. Open your fragment and select Variations from the side panel.

  2. Select the required variation.

  3. Select Delete from the Actions drop-down.

  4. Confirm the Delete action in the dialog.

NOTE

You cannot delete Master.

Synchronizing with Master

Master is an integral part of a content fragment and by definition it holds the master copy of the content, whereas the variations hold the individual updated and tailored versions of that content. When Master is updated it is possible that these changes are also relevant to the variations and, therefore, need to be propagated to them…

When editing a variation you have access to the action for synchronizing the current element of the variation with Master. This lets you automatically copy changes made to Master to the required variation.

CAUTION

Synchronization is only available to copy changes from Master to the variation.

Only the current element of the variation is synchronized.

Synchronization only works on the Multi line text data-type.

Transferring changes from a variation to Master is not available as an option.

  1. Open your content fragment in the fragment editor. Ensure that the Master has been edited.

  2. Select a specific variation, then the appropriate synchronization action from either:

    • the Actions drop-down selector - Sync current element with master

      synchronizing with master

    • the toolbar of the full-screen editor - Sync with master

      synchronizing with master

  3. Master and the variation is shown side-by-side:

    • green indicates content added (to the variation)
    • red indicates content removed (from the variation)
    • blue indicates replaced text

    synchronizing with master

  4. Select Synchronize, the variation is updated and shown.

On this page