Expand my Community achievements bar.

SOLVED

Experience Fragment HTML Export to Adobe Target Transformer Issue

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 2

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.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

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.

Avatar

Level 5
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?