Hello,
I have a list of page url-s. For each of them I have to get the page description. Is there any ready API to send the page url from JS in order to get the page description? Or should I create an API? Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @AD-Engineer -
I assume, you are referring to the description stored on the page in jcr:content node.
If yes, you can retrieve it in javascript by accessing the path over HTTP or Ajax call in the format %page_path%/jcr:content.json.
Ex: /content/we-retail/language-masters/en/men/jcr:content.json for the page content/we-retail/language-masters/en/men.html
This gives the completed information present on the node along with description in json format.
Thanks,
Fani
Hi @AD-Engineer -
I assume, you are referring to the description stored on the page in jcr:content node.
If yes, you can retrieve it in javascript by accessing the path over HTTP or Ajax call in the format %page_path%/jcr:content.json.
Ex: /content/we-retail/language-masters/en/men/jcr:content.json for the page content/we-retail/language-masters/en/men.html
This gives the completed information present on the node along with description in json format.
Thanks,
Fani
I think you should reconsider the implementation, instead of return just path from list, return the title, description etc as an object and reuse it.
If it is not possible then you should consider creating a dedicated api. You should not be using OOTB json, which leads into security vulnerability if .json is not unblocked for all the request.
Views
Likes
Replies