51黑料不打烊

Authoring Content Fragments authoring-content-fragments

Content Fragments are a content abstraction in AEM that allows text-based content to be authored and managed independently of the channels it supports.

AEM Content Fragments are text-based editorial content that may include some structured data elements associated but considered pure content without design or layout information. Content Fragments are typically created as channel-agnostic content, that is intended to be used and re-used across channels, which in turn wrap the content in a context-specific experience.

This video series covers the authoring life-cycle of Content Fragments in AEM. Details about delivering Content Fragments can be found here.

  1. Enabling and defining Content Fragment Models
  2. Authoring Content Fragments
  3. Downloading Content Fragments
  4. Editorial capabilities

Defining Content Fragment Models defining-content-fragment-models

video poster

Transcript

Let鈥檚 take a look at content fragments in AEM. Content fragments are - channel agnostic data, that represents some - logical content construct. For example, an article - comprised of a title, article, text, author, and pull quote, or store location comprised - of an address, phone number and hours of operation. Or even something as simple - as a disclaimer or warranty. Let鈥檚 get started by looking - at content fragment models, or the data definition - of a content fragment. Content fragment models are made available per AEM configuration, allowing - their use to be controlled by the AEM Assets folder hierarchy. We need to make sure that - the content fragment models are enabled, note that - content fragment models can be enabled globally, but this means any content fragments derived from this content fragment model, will be available for creation - anywhere in AEM Assets. Once enabled, we can create - content fragment models for this configuration by going to tools, assets, content fragment models. Here, we have a list of - all the configurations in AEM that have content - fragment models enabled. Let鈥檚 create a new content fragment model. This model will define the - data schema for contributors who author magazine articles - that appear on the WKND site. In the content fragment model editor, we define the data collection form that doubles as the data model for all content fragments - derived from this model. Over here on the right, we - have a variety of data type options that can be used to define our content fragment model鈥檚 elements. Let鈥檚 add a single text element for contributor鈥檚 full - name, and make it required. We must provide a property type in which this data will be stored. We鈥檒l add a multi-line - text that we can use for the contributors long form biography.

And a content reference for their picture.

This can be used to point to other content in AEM such as image assets, and we can do things like limited. So authors can only select - assets from content in WKND.

Let鈥檚 add an occupation drop down where we can predefine a list of options.

So we鈥檝e done two things - simultaneously here. One, we鈥檝e defined the data - model for our contributors. And two, we鈥檝e defined - the data collection form authors will use to create - content representations of our contributors.

Note that the models can be changed after they鈥檝e been used to - create content fragments. However, this current - state of the model applies to all content fragments - derived from the model. Meaning if a new element is added to the content fragment model, and content fragments created - before the new element was added, will have this element, but it will be blank until - an author publishes it. - -

AEM Content Fragments Models, the data schemas of Content Fragments, must be enabled via AEM鈥檚 Configuration Browser, which allows Content Fragment Models to be defined on a per configuration basis.

Creating Content Fragments creating-content-fragments

video poster

Transcript

Now that we have our - Content Fragment Model let鈥檚 create a content fragment from it. We鈥檒l head over to assets, files and double-check that our assets folder is assigned to the weekend configuration. This will allow us to create our contributor content fragment, and we can see here that - it鈥檚 already properly mapped. Let鈥檚 create a new content fragment. For this, we鈥檒l navigate - into the assets folder that will house our new content fragment. Note that I鈥檒l be creating - these content fragments beneath an English locale - folder whose known name is EN. This will be important later on when we take a look at summarization.

We can create a new contact, pick the contributor fragment model, and now we can fill out - the data collection form.

The multi-line text element - is of particular interest. When opening this element - in full screen mode we get extra formatting - and editing controls including text format, text statistics, import content from - file and summarize text. Assuming that our content - fragment is located in the supported locale folder. And remember we put ours in English which is why we see this option.

When the multi-line text - element is in full screen mode with a content type of rich text there are extra editor options running across the top of the