내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to use a simple HTML component dynamically

Avatar

Level 1

I created a simple HTML component also I entered the embed google map HTML iframe script, But i have to use in dynamically in multiple pages. Could you please suggest a way.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 4

Hi @sanzstark ,

 

  One of the easiest way to do this to create an content wrapper/include component that uses data-sly-resource to render the resource and take resource path(page path) as an input. 

 

bipinchandra92_0-1655491979924.png

 

You had to create an page with just your map iframe in AEM and pass the page path to the wrapper/include component. You can either include(path/to/resource) till resource at root(can be useful for the rendering other pages content Disadvantage: Components becomes authorable in the wrapper/include component) or at the component level(yours's map iframe component resource path Advantage: Component is not authorable in wrapper/include components). You can customize the same as per your requirements.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Level 4

@sanzstark  hi Sanz 

 hope this link helps you : https://experienceleague.adobe.com/docs/experience-manager-htl/using/getting-started/getting-started...

If you are not sure how deep your content structure is, you can use infinity.json to get data at all level.

It looks like current implementation returns all level response instead of actual data (Which could be huge).

For performance reason and security reason avoid using .infinity.json.

Avatar

Community Advisor

You can try to build using experience fragment and reuse it using ajax call or directly included using Experience Fragment component in the page

Arun Patidar

AEM LinksLinkedIn

Avatar

정확한 답변 작성자:
Level 4

Hi @sanzstark ,

 

  One of the easiest way to do this to create an content wrapper/include component that uses data-sly-resource to render the resource and take resource path(page path) as an input. 

 

bipinchandra92_0-1655491979924.png

 

You had to create an page with just your map iframe in AEM and pass the page path to the wrapper/include component. You can either include(path/to/resource) till resource at root(can be useful for the rendering other pages content Disadvantage: Components becomes authorable in the wrapper/include component) or at the component level(yours's map iframe component resource path Advantage: Component is not authorable in wrapper/include components). You can customize the same as per your requirements.