Expand my Community achievements bar.

SOLVED

Is there any way to retrieve CRX content without OSGI?

Avatar

Level 5

Is there any way to get the JCR content of the node names without OSGI classes. only via the Javascript frameworks like angular JS. Am looking for a solution to build a Top Navigation for an website without any OSGI Classes and retrieve the Page names and its properties and use them.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi 

I could think of couple of ways of doing it.

 

Option 1:- Using JavaScript Use-API

Link:- http://adobeaemclub.com/javascript-use-api-with-a-simple-component-in-sightly/

//  var title = properties.get(Constants.TITLE, "")
    var description = properties.get(Constants.DESCRIPTION_PROP, "");

 

Option 2:- Go to Query builder tool, create a query there in the tool there is a option of JSON QueryBuilder Link, use this link in JavaScript to retrieve the data.

               I do not think that we could directly fetch the data of JCR using JavaScript, as data is stored in back-end and to fetch data from back-end you need to have some back-end service to get data to front-end. So you could use available service or you may create a service and can fetch the data in front-end using AJEX call.

 

I hope this will help you.

~kautuk



Kautuk Sahni

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

Hi 

I could think of couple of ways of doing it.

 

Option 1:- Using JavaScript Use-API

Link:- http://adobeaemclub.com/javascript-use-api-with-a-simple-component-in-sightly/

//  var title = properties.get(Constants.TITLE, "")
    var description = properties.get(Constants.DESCRIPTION_PROP, "");

 

Option 2:- Go to Query builder tool, create a query there in the tool there is a option of JSON QueryBuilder Link, use this link in JavaScript to retrieve the data.

               I do not think that we could directly fetch the data of JCR using JavaScript, as data is stored in back-end and to fetch data from back-end you need to have some back-end service to get data to front-end. So you could use available service or you may create a service and can fetch the data in front-end using AJEX call.

 

I hope this will help you.

~kautuk



Kautuk Sahni

Avatar

Level 10

Best Practice is using OSGi/Java APIs. What is your issue with using OSGi? 

Using OSGi - you need a session to the JCR - which is done via Java and Sling Mapping. https://helpx.adobe.com/experience-manager/using/querying-experience-manager-sling.html

There is a video now that steps you through the process.