Experience fragment on a page without including its css and js files | Community
Skip to main content
anelem1760873
Level 4
March 19, 2021
Solved

Experience fragment on a page without including its css and js files

  • March 19, 2021
  • 2 replies
  • 1581 views

Hi there,

is the a way in AEM we can include an experience fragment on a page without including its css and js files, using HTL
Something like this, is there any argument to pass to ignore/exlude css and js file on this.

<sly data-sly-resource="${ @ path="experiencefragmentPathHere", resourceType='wcm/foundation/components/parsys', wcmmode='disabled', decoration='false' }"></sly>

 Thanks

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 Umesh_Thakur

We had similar kind of requirement, so we had created two xf structure component and so two template one with and another without clientlibs.

We were using without clientlib XF, to create a experince fragment to be embeded on the page where we allready have all the client libs to generate the look and feel for the experience fragment.

And with clintlibs to create experience fragment, where we were using experience fragment stand alone.

 

So you can take that approach to handle to scenario.

 

If you don't have that option available you can take help from template policy to include or exclude a client libs based on there category.

 

Hope this will help.

Umesh Thakur

 

2 replies

Umesh_Thakur
Community Advisor
Umesh_ThakurCommunity AdvisorAccepted solution
Community Advisor
March 19, 2021

We had similar kind of requirement, so we had created two xf structure component and so two template one with and another without clientlibs.

We were using without clientlib XF, to create a experince fragment to be embeded on the page where we allready have all the client libs to generate the look and feel for the experience fragment.

And with clintlibs to create experience fragment, where we were using experience fragment stand alone.

 

So you can take that approach to handle to scenario.

 

If you don't have that option available you can take help from template policy to include or exclude a client libs based on there category.

 

Hope this will help.

Umesh Thakur

 

arunpatidar
Community Advisor
Community Advisor
March 19, 2021

Hi, can you try with content selector?

Arun Patidar