Expand my Community achievements bar.

SOLVED

Hosting static HTML in AEM and including authored content from the static HTML

Avatar

Level 4

Hello,

I am trying to understand if AEM can host a "static" web site that includes content authored from AEM.

The static web site is an Angular SPA application. The application is similar to an intranet: most pages do not have editorial content, the navigation is static (editors do not create/move pages shown in the navigation menu) and the widgets have lots of integration with legacy back end systems. However, one part of this application, a small subset of pages, involves editorial content and we are using AEM's WCM capabilities for editing those pages.
We want to use AEM just as a host for the static parts and include an iframe inside the editorial pages that includes the editorial pages created on AEM. The iframe would point to AEM publish itself in order to render the content.

Why not integrating the whole site inside AEM? The reason is that the majority of the web pages do not involve any editorial content and AEM would be a useless bottleneck when it comes to integrate the HTML, JS and CSS of those non editorial pages inside AEM templates and components. Also, the team implementing the static web site is not the same owning the AEM integration.

I am aware that, by using this approach, the author wouldn't have the chance to preview the authored content directly inside the real application layout, but this is an acceptable drawback.

The doubts are:

  • does this approach make sense for you? Do you have any better approach for handling this scenario?
  • how to include the authored content inside the static web pages? The idea is to use an iframe with src pointing the AEM publish instance. Does this make sense? How to avoid to fire a HTTP GET request to itself (considering that the static web site and the editorial pages are on the same server)? Is there any better inclusion mechanism?

Thanks a lot!

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

of course you can use AEM for this. It's not the best way to use its capabilities effectivly, but it works. And the iframe approach is probably a way, which doesn't require too much integration of your SPA with AEM (and vice versa).

There are a lot of other options and things you could do, but this would require more intimate knowledge about your specific usecase, and the environment you are working on. And of course your future plans :-)

Jörg

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

Hi,

of course you can use AEM for this. It's not the best way to use its capabilities effectivly, but it works. And the iframe approach is probably a way, which doesn't require too much integration of your SPA with AEM (and vice versa).

There are a lot of other options and things you could do, but this would require more intimate knowledge about your specific usecase, and the environment you are working on. And of course your future plans :-)

Jörg