Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Embed external site

espinari
Level 1
Level 1

I have created a Tbymeleaf Spring simple app that provides a simple html page as output. I want to embed this site into aem and have tried extending the Embed component with a custom url processor, but when rendering the page I only see the URL. Is there a way to render the output of an external system???

4 Replies
chaudharynick
Level 1
Level 1

Can you inspect the page and look for console logs/errors.

Also, in the component dialog box what type checkbox have you selected?

espinari
Level 1
Level 1
@chaudharynick no console errors. It is "URL" that's why I implemented a custom URL processor
Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @espinari,

Can you confirm if you have HTL file in the name of the custom processor. If yes, how are you including the content from external site. 

espinari
Level 1
Level 1

Hi @Vijayalakshmi_S,

 

I extended the embed component and created the htl file with the same name as the custom url processor (as suggested by Adobe). To render the content of the external html I used an iframe, but just for testing purposes..... I would like to know if there is another way to render the content without using an iframe (I reckon the pinterest out of the box component uses a js library to render the content, so maybe that's something I need to get done, unfortunately Im no expert with js).

Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @espinari,

No worries. There are quite a few options available online to include external content without use of Iframe.(Example : https://stackoverflow.com/questions/39102215/how-to-show-external-website-inside-another-page-withou...)

One such is use of load function of jQuery - https://api.jquery.com/load/

(You can surf and decide which best suits your use case)

Good read about working with HTML content in a page for your reference - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Safely_inserting_external_con...

 

 

 

espinari
Level 1
Level 1
Thanks @Vijayalakshmi_S!!!! Another one, is there any solution to render at server side (just like HTL) the external site? I already created a solution to import information from external sites as a model so I'm wondering this 'cause maybe in the future Ill get asked to get this done as mentioned.... thanks a lot for the help!!! 😄
shelly-goel
Community Advisor
Community Advisor

@espinari  - You can use iframe and embed the site url in it to render on AEM page

espinari
Level 1
Level 1
@shelly-goel I totally forgot to mention that the iframe is not an option (I used it for testing purposes and it works).