Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Embed external site

Avatar

Level 2

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

9 Replies

Avatar

Level 2

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

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

Avatar

Level 2
@chaudharynick no console errors. It is "URL" that's why I implemented a custom URL processor

Avatar

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. 

Avatar

Level 2

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).

Avatar

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...

 

 

 

Avatar

Level 2
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!!!

Avatar

Employee Advisor

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

Avatar

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