Experience Fragment HTML Export to Adobe Target Transformer Issue | Community
Skip to main content
Level 2
April 24, 2020
Solved

Experience Fragment HTML Export to Adobe Target Transformer Issue

  • April 24, 2020
  • 2 replies
  • 2799 views

I have created an experience fragment template(editable) by inheriting from the "cq/experience-fragments/components/xfpage". However I am not using scripts from the parent component in rendering. Everything looks good in the final html page source while I preview in a disabled mode. 

 

However when I export this to Target, I can see the content has got the below client libraries present and I have found that this is coming from the /libs/wcm/foundation/components/page/headlibs.html which is the parent of "cq/experience-fragments/components/xfpage". I am able to get rid of the client includes by overlaying this file and omitting the line <sly data-sly-call="${clientLib.all @ categories='cq.foundation-main'}" />. Now it is a lot cleaner. 

<div><link rel="stylesheet" href="http://localhost:4503/etc.clientlibs/foundation/clientlibs/main.css" type="text/css"><script type="text/javascript" src="http://localhost:4503/etc.clientlibs/clientlibs/granite/jquery.js"></script><script type="text/javascript" src="http://localhost:4503/etc.clientlibs/clientlibs/granite/utils.js"></script><script type="text/javascript" src="http://localhost:4503/etc.clientlibs/clientlibs/granite/jquery/granite.js"></script><script type="text/javascript" src="http://localhost:4503/etc.clientlibs/foundation/clientlibs/jquery.js"></script><script type="text/javascript" src="http://localhost:4503/etc.clientlibs/foundation/clientlibs/shared.js"></script><script type="text/javascript" src="http://localhost:4503/etc.clientlibs/foundation/clientlibs/main.js"></script><link rel="stylesheet" href="http://localhost:4503/libs/cq/experience-fragments/components/xfpage/css.css" type="text/css"><div class="container">

 

My question is why the Experience Fragment Transformer for HTML Export type is rendering the content which is not present in the normal rendering of the experience fragment. Additionally can I write a custom transformer so that I get rid of any markup other than the component markup added to the experience fragment.

 

Note: I am using IMS based config and it is getting exported to Adobe Target as HTML Offers. Not sure if this issue is present if the Offer is exported as Experience Fragment.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aem65user

The markup while exporting to Target is based on /libs/cq/experience-fragments/components/xfpage/body.nocloudconfigs.html and the wrapper div's could be removed here.

2 replies

aem65userAuthorAccepted solution
Level 2
April 25, 2020

The markup while exporting to Target is based on /libs/cq/experience-fragments/components/xfpage/body.nocloudconfigs.html and the wrapper div's could be removed here.

Level 5
July 18, 2020
Hello - I have overlay this file and removed the entry from headlibs.html but still I see the unwanted clientlibs getting loaded in publish. Can you tell me if you had to do anything other than this?