내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to create/expose JSON from Navigation Component?

Avatar

Level 1

Is there any way by using sling model/exporter we can expose Navigation menu items in JSON/HTML/XML format.

Since Navigation component has only one field to author i.e. root page property and it populates all sub tree so only root path get stored on jcr:content. and we try model.json we get only root page path property in it. How to get all the tree values in json?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Create a custom sling model exporter  -

Develop Sling Model Exporters

And populate the child nodes as u do it in navigation component >>>> iterate over the child nodes.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Create a custom sling model exporter  -

Develop Sling Model Exporters

And populate the child nodes as u do it in navigation component >>>> iterate over the child nodes.

Avatar

Level 1

Thank you but how to create xml using sling model.

Since for json it provides jackson, is there anything for xml ?

Avatar

Community Advisor