JSON reponse for inherited child page

Avatar

Avatar

vijayk87714775

Avatar

vijayk87714775

vijayk87714775

14-02-2018

I was able to generate page json response with URL-1.json . but issue here is I have a parent page which has left navigation tree  and its inherited across all child pages.
I was able to see tree in the json response when I use parent page. But with the child page I am not able to see  tree in the json reponse .

Any one has any thoughts ?

Thanks

Replies

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

14-02-2018

TRY URL-1.1.infinity.json

Avatar

Avatar

vijayk87714775

Avatar

vijayk87714775

vijayk87714775

14-02-2018

Hi Hemant,

Thanks for replying and I have tried with what u have suggested, but still  tree doesn't show  in the json response.

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

15-02-2018

Can you elaborate the requirement ?

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

15-02-2018

I agree - please describe what are you trying to achieve - do you need the JSON as part of an AEM component?

Avatar

Avatar

vijayk87714775

Avatar

vijayk87714775

vijayk87714775

15-02-2018

I've a iParsys on a page on which a component is there and so that component is inherited on all child pages. When I try to generate the JSON of page on which iParsys is there using selector-extension (-1.json) I get the JSON response that displays component properties which is there on iParsys. But, when I try to generate the json response using same selector-extension for child pages, then it generates the json but doesn't display component properties which is there inside iParsys.

I hope it makes it clear what I'm trying to achieve.

Thanks,
Vijay

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

16-02-2018

You will not be able to get it directly through page-name.json as the iparsys node is not present under the child page. However if you are trying to get it in sightly through java-script api , then get the parent page json always and get the value or you make a separate call to parent page json always and tweak the logic such that on all child pages of that particular template , you can iterate and get value. or you might have to overlay the iparsys component and customize the creation of iparsys node in child page or you can write a service/servlet that returns the json of a page and check in your logic if the the page has iparsys and has children then add the parent page iparsys json object to child page json. something like that.

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

16-02-2018

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

16-02-2018

Another nice explanation!

Avatar

Avatar

Hemant_arora

Avatar

Hemant_arora

Hemant_arora

16-02-2018

Thanks smacdonald