1

Is there a way to get child items from a droptree (itemlink) path in JSS using React without using GraphQL?

I see there are LayoutService but it only retrieves child from the contextItem or DataSource. I want to retrieve child item from the DropTree field on the template.

For example, I have Footer template where I have field Social Media Links Folder path which is DropTree field. So in JSS React code, I want to retrieve like

const Footer = (props) => {

  const model = props.fields ? props.fields : {}

  const child = model.socialLinks.children
}
0

You can create your own custom resolver by inheriting RenderingContentsResolver Over ride ResolveContents method, get your data source item, which will have the droptree field. you can get the child/related items details and create your JObject item to return, as per your requirement.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.