Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

data-sly-resource passing data to the another component

Avatar

Not applicable

<sly data-sly-resource="${ x @ resourceType='/apps/xxxxxx/components'}" data-sly-unwrap></sly>

It works in the preview mode.when we go to edit  mode, the page hangs up.please help me in this.

And also tell me other ways to pass resource to another component.

1 Accepted Solution

Avatar

Correct answer by
Employee

you can use selectors for this. However this is not the intention of data-sly-resource.

Have a look if a template (data-sly-template) suits your requirement

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

you can use selectors for this. However this is not the intention of data-sly-resource.

Have a look if a template (data-sly-template) suits your requirement

Avatar

Level 10

Components should as much as possible get their values from Dialog or OSGi configurations. Passing values between components is not a great practice. 

Avatar

Not applicable

can you give a good example for this?