Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
leeaslingAccepted solution
Level 8
Feb 29, 2016 2:22 PM UTC

That's a different requirement.  Personally I think that not liking something is not a good reason to not use it - it does what you want without building something custom.

If the requirement is to include content from a page without using an iframe, off the top of my head i can think of 2 approaches:

1)  Make an AJAX request to the page and use selectors to grab the content you want.
2)  (Assuming AEM 6 or above) You could use a Sightly class coupled with JSoup and grab the page content and render it out using selectors again.  This would be cacheable whereas #1 would not be.

3 replies

Level 8
Feb 28, 2016 6:36 PM UTC

You can use the "External" component under the "General" group.  This will create an iframe with the content from the URL.

Translate
Level 4
Feb 29, 2016 2:16 PM UTC

I've tried that ... but I don't like the idea of an iframe.  I'm really looking for something that you can include the source code from the file into my current page.

-Dean

Translate
leeaslingAccepted solution
Level 8
Feb 29, 2016 2:22 PM UTC

That's a different requirement.  Personally I think that not liking something is not a good reason to not use it - it does what you want without building something custom.

If the requirement is to include content from a page without using an iframe, off the top of my head i can think of 2 approaches:

1)  Make an AJAX request to the page and use selectors to grab the content you want.
2)  (Assuming AEM 6 or above) You could use a Sightly class coupled with JSoup and grab the page content and render it out using selectors again.  This would be cacheable whereas #1 would not be.

Translate