Reputation: 1217
I would like to read all the pdf titles and display links on a page.
PDFs are located at
<script>
var path = 'content/dam/geometrixx/documents';
var url = CQ.HTTP.noCaching(path+'.infinity.json');`
</script>
I tried above CQ JavaScript API to read the content tree but the url is evaluating to :
rather than
"http://localhost:4502/content/dam/geometrixx/documents.infinity.json"
Could some one please shed some light on this ?
Thank you, Sri
Upvotes: 0
Views: 203
Reputation: 7118
You are using a relative path just add a '/' at the beginning of your path. The url parameter comes from the noCaching
method.
<script>
var path = '/content/dam/geometrixx/documents.infinity.json';
var url = CQ.HTTP.noCaching(path);
</script>
Upvotes: 1