Highlighted

Exporting Content Fragment vs Page

Jarvis_Lukow

12-04-2019

I am in the process of building a content as a service (CaaS) solution, within AEM, for an external application.  We currently use sites and I am exploring the key features and best practices for implementing a Caas solution.

I have followed the examples provided by Adobe and the community regarding setting up and consuming content fragments via a sites page using a content fragment model and then referencing a content fragment within a sites page.  (http://localhost:4502/content/caas/test-content-fragment.model.json)

While this approach works, it seems like a lot of work to create/manage content that will be exposed. 

  1. Create a content fragment (A)
  2. Create a page within sites (B)
  3. Reference the content fragment (A) on the page (B)
  4. Consume content fragment (A) via page (B):  http://localhost:4502/content/b/a.model.json

I am wondering if there is any reason why we can't simply expose content without using a content fragment at all?

  1. Create a page within sites (B)
  2. Add components to page (B)
  3. Consume page (B):  http://localhost:4502/content/b.model.json

I understand using this approach means I don't get to use the features of content fragments, but it does simplify the content management workflow.  Are there any reasons why you wouldn't recommend this approach?  Or why one should consider using content fragments even though the content management process is more complex?

Deviating from the Adobe examples, I see I can export a content fragment directly without a sites page: http://localhost:4502/content/dam/caas/test-content-fragment/jcr:content/data/master.json).   Are there any issues with exporting the content fragment directly?

Replies