Nested Multifield

Avatar

Avatar
Validate 1
Level 3
tahir1601
Level 3

Likes

21 likes

Total Posts

41 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile

Avatar
Validate 1
Level 3
tahir1601
Level 3

Likes

21 likes

Total Posts

41 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile
tahir1601
Level 3

12-06-2019

Hey folks,

I am trying to fetch nested multifield using sling model. i am able to see the nodes created under content folder but in sightly i am not able to see it.

below is the code

<sly data-sly-list.head="${multiitems.parentmultifield.listChildren}">

${head.something}

----

<sly data-sly-list.subhead="${head.childmultifield.listChildren}">

${subhead.something}

</sly>

</sly>

I am able to fetch values of parent multifield(head.something), but having issue to see child multifield data in sightly(subhead.something)

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

12-06-2019

Could you please check if your method head.childmultifield (getChildmultifield) returns resource type? If nodes are getting saved then this is issue with logic which you have written in Sling Model or Sightly.

Avatar

Avatar
Validate 1
Level 3
tahir1601
Level 3

Likes

21 likes

Total Posts

41 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile

Avatar
Validate 1
Level 3
tahir1601
Level 3

Likes

21 likes

Total Posts

41 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile
tahir1601
Level 3

12-06-2019

my sling model is as below

@Inject

@Optional

public Resource parentmultifield,childmultifield;