So we have a number of experience fragments our authors have created and we want to export them as plain HTML. According to the documentation, you simply use the .plain. selector in the URL and poof it should work. This doesn't seem to work so questions:
1. Are you supposed to be hitting the XF directly? If so, how do you construct a URL to hit the XF directly?
2. Are you supposed to add the XF to a page and then use the selector? We tried this, but .plain. just returns the same page.
3. Are there dispatcher changes needed to do this?
This does feel like a fundamental gap in understanding how this works from our end, but the docs are very light here and it appears like it should "just work". Any help is appreciated.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @williamkr1,
The plain selector will change the URL to the publish one. However, 'generally' the XFs are not to be accessed to the publisher as they're used to export to third party like Target directly from Author instance.
If you need to check html which is being sent to third party like Target, please use 'nocloudconfigs' selector.
By default, when you construct a Target HTML Offer, a request is sent to a custom Sling selector in AEM. This selector is called .nocloudconfigs.html . As its name implies, it creates a plain HTML rendering of an Experience Fragment, but does not include cloud configurations (which would be superfluous information).
Hope this helps!
Jineet
Experience Fragment can be easily accessed by hitting the URL with "plain" selector for example
https://localhost:4502/content/experience-fragment/fragmentName/master.plain.html.
If still not working check logs see what error your are getting put it here.
Dispatcher also can block your requests you need to allow experience fragment path in filter section
Hi @williamkr1,
We need to use the selector "plain" to XF as below (Highlighted in bold is an XF along with plain selector in italics)
If we have references to links via src/ href /action attribute in your XF content (lets say via Image component or text with anchor tag), it will be preceded with publish instance domain and port
More about this in below:
As you have mentioned it is not working with "plain", could you please share details on your XF path and complete URL on how you are trying to access.
Hello @williamkr1,
The plain selector will change the URL to the publish one. However, 'generally' the XFs are not to be accessed to the publisher as they're used to export to third party like Target directly from Author instance.
If you need to check html which is being sent to third party like Target, please use 'nocloudconfigs' selector.
By default, when you construct a Target HTML Offer, a request is sent to a custom Sling selector in AEM. This selector is called .nocloudconfigs.html . As its name implies, it creates a plain HTML rendering of an Experience Fragment, but does not include cloud configurations (which would be superfluous information).
Hope this helps!
Jineet
Please check /libs/experience-fragments/config/rewriter/experiencefragments configuration if plain selector is enabled for the attributes. This could be the reason but not sure worth to give a try.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies