Part 3 of the AEM Content Services tutorial covers creating and authoring FAQ Content Fragments from the Content Fragment Model created in Part 2.

Tutorial table of contents

Authoring a FAQ Content Fragment

With a FAQ Content Fragment Model created and the AEM Configuration for We.Retail applied to the /content/dam/we-retail Asset folder (via the cq:conf property), a FAQ Content Fragment can be created.

Content Fragments, which are a type of Asset, should be organized and managed in AEM Assets just like other assets. 

  • Use locale folders in the Assets folder structure if translation is (or may be) required
  • Logically organize Content Fragments so they are easy to locate and manage

In this step, a FAQ addressing how "users can find their order status" is created under an Assets folder heirarchy: /content/dam/we-retail/en/faqs/orders

part_3_-_authoringafaqcontentfragment
  1. Navigate to AEM > Assets > Files > We.Retail > English and create Asset folders FAQs > Orders.

  2. Within Assets > Files > We.Retail > English > FAQs > Orders create a new Content Fragment of type FAQ with a title of Order Status.

    The Title and Description collected during the New Content Fragment wizard are stored as Asset Metadata and are not used to populate the actual Content Fragment Model fields (ie. Question an Answer).

  3. Author the newly created FAQ Content Fragment.

    • Question: Where can I find the status of my order?
    • Answer: Upon completing an order, you will be e-mailed a copy of your order to your registered e-mail address.

      You can find the status of your order by logging in to your account on our Web site and select My Account > My Open Orders
      Select the order in question for details.

    Tap Save in the top action bar to save changes.

  4. Using AEM's Package Manager, install the package below on AEM Author. This package contains a number of FAQ Content Fragments for Orders, Shipping and Returns and Company, as well as as We.Retail logo image.

Reviewing the Content Fragment's JCR structure

This section is informational only and meant to socialize the underlying JCR structure of Content Fragments made from Content Fragment Models.

part_3_-_contentfragmentjcrstructure
  1. Open CRXDE Lite on AEM Author.

  2. In CRXDE Lite, on the left-hand hierarchy menu, navigate to /content/dam/we-retail/en/faqs/orders/order-status/jcr:content which is the node representing the Content Fragment in the JCR. 

  3. Select the data node. Review in properties that it has a property cq:model that points to the FAQ Content Fragment Model definition.

    • cq:model = /conf/settings/we-retail/dam/cfm/models/faq
  4. Beneath the data node select the master node and review the properties. This node contains the data collected when an instance of the FAQ Content Fragment Model is authored. Note the two properties and their values:

    • answer
    • question

    The JCR property names correspond to the Content Fragment Model property name's, and the values correspond to the authored values of the "Order Status" FAQ content fragment.

  5. Lastly, open then renditions node under the order-status/jcr:content node.

    Note that there are NO renditions, not even an original rendition. Take note of this as Assets tyically have at least an original rendition, and if custom code exists that makes this assumtion, ensure it it adjusted to handle this case or exclude Content Fragments made from Content Fragment Models.

Next step

Make sure the aem-content-services-tutorial.part3 package is installed on AEM Author as it contains a larger set of Content Fragments.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy