JSON reponse for inherited child page | Community
Skip to main content
vijayk87714775
Level 4
February 14, 2018

JSON reponse for inherited child page

  • February 14, 2018
  • 4 replies
  • 5819 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Hemant_arora
Level 8
February 15, 2018

TRY URL-1.1.infinity.json

vijayk87714775
Level 4
February 15, 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.

Hemant_arora
Level 8
February 15, 2018

Can you elaborate the requirement ?

smacdonald2008
Level 10
February 15, 2018

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

vijayk87714775
Level 4
February 16, 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

Hemant_arora
Level 8
February 16, 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.

smacdonald2008
Level 10
February 16, 2018

Another nice explanation!