Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Creating Experience fragments programatically

Avatar

Level 4

How do I create the same kind of experience fragments with the same layout of components in with but with different content programmatically? Is there a service to create an experience fragment?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You cannot create Experience Fragments by using an API.

View solution in original post

6 Replies

Avatar

Level 10

AEM does not expose an API that lets you create exp fragments programmaticall. All done in the UO as described in the docs!

Avatar

Level 1

smacdonald2008​ Hi did you mean that this fuction is only available in UI?

We are also looking at integrting a workflow application that creates a Exp. Fragment using REST API. This is not possible right?

Regards

SS

Avatar

Level 2

Did you found any solution / alternative to create experience fragments programmatically ?

Avatar

Administrator

There is not API exposed to this directly. Request you to please reach-out to support for this.



Kautuk Sahni

Avatar

Correct answer by
Former Community Member

You cannot create Experience Fragments by using an API.

Avatar

Community Advisor

Creating XF is same as creating Page using Pagemanager JAVA API

PageManager ("The Adobe AEM Quickstart and Web Application.")

Example reading page details from CSV and creating pages

aem63app-repo/java/csvtopage at master · arunpatidar02/aem63app-repo · GitHub



Arun Patidar
The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----