Hi,
I find myself confused every now and then regarding HTML pages, JSP pages, etc. in CQ5. I guess I have to re-read the Sling docs again.
But basically, at the moment, under our app folder (e.g. /apps/foo) we have a bunch of .html pages that are requested by our Angular JS app via AJAX.
I want to add some dynamic code to these pages (e.g. JSP scriptlets, etc.)
What is the proper way of doing this in CQ 5?
Thanks.
Solved! Go to Solution.
The proper way is generate the HTML files your angular app uses from a JSP.
So what you would is create the following:
Views
Replies
Total Likes
The proper way is generate the HTML files your angular app uses from a JSP.
So what you would is create the following:
Views
Replies
Total Likes
Oratas has covered the basics.... Or you could think about moving to v6 so you can use HTML with Sightly and finally get rid of all that JSP nonsense.
I'd advise you to go with Sightly instead of JSP for any new project as it is designed to replace JSP. This will give you automatic proper HTML encoding and cross-site scripting protection built-in. It will also force some healthy separation of concerns, preventing the kind of code & markup mix you typically can end-up with in JSPs. Thus making the markup overall more readable.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies