Hi All
CQ version 5.6
I have the following scenario. Content is authored and stored in my CQ instance.
Site A is using CQ and http://myUnsecuredSite/home/myCQPage.html will be deleivered by CQ. Straight forward scenario here
Now here is where things start getting a little bit complex
I want on my secure site “Site B” for page https://mySecuredSite/home/notCQPage.html to be able to display the content of the body of myCQPage.html. Only the header and the footer are different the rest of the content will be the same. This site will not be build in CQ
The question is how do I build my notCQPage.html with content stored in my CQ site ( site A) ? I also need to make sure that the header and footer is visually the only difference between myCQPage.html and notCQPage.html
Any guidance or suggestion is much appreciated
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I would provide a "includecontent.jsp" on the template level, which just renders the body of the page, omitting the headers and footers. Then you can do a HTTP request to http://myUnsecuredSite/home/myCQPage.includecontent.html in your non-AEM application and insert the content there. I would place a dispatcher in front of the AEM instance to have these requests cached, which will save you lot of latency.
Jörg
Views
Replies
Total Likes
Hi,
Couple of ways here.
1. Directly do a JCR query to the page node and read the necessary parsys from 'Site B'
2. You can get json response and parse the content what you need.
Views
Replies
Total Likes
Hi,
I would provide a "includecontent.jsp" on the template level, which just renders the body of the page, omitting the headers and footers. Then you can do a HTTP request to http://myUnsecuredSite/home/myCQPage.includecontent.html in your non-AEM application and insert the content there. I would place a dispatcher in front of the AEM instance to have these requests cached, which will save you lot of latency.
Jörg
Views
Replies
Total Likes
As bsloki points out - you can get the HTML for a page located here:
[img]partext.png[/img]
Views
Replies
Total Likes
Thanks gents for the response
Can my "Site B" get the HTML live from the CQ repository i.e. by making an AJAX call to CQ sling servlet, or the latency will be too long to try and render the CQ content on page load of "Site B"
The other alternatives i guess will be
1) CQ custom service to push published content(JSON/XML) on replication. My "site B" picks up the JSON of the newly published content from i.e. a relational database, or filesystem
2) pull the published CQ content at certain intervals. The pulled content(JSON) is parsed and stored in a relational database. "Site B" is rendering content from the relational database
Any suggestion on which proposal could work?
Views
Replies
Total Likes
YOu can code a servlet to host in Site A. Then invoke it from the other site. The servlet can return JSON data after reading the JCR. However - this would be a custom servlet - it's not an outof the box feature.
Views
Replies
Total Likes
Views
Likes
Replies