Hi all,
We are working on custom SPA component which is supposed to take the given content fragment & use its field on page.
In sites custom component we achieved this simply by using below snippet in html & it works fine. cfPath is content fragment path selected in component dialog's pathbrowser field.
<sly data-sly-test.cfPath="${'{0}/jcr:content/data/master' @ format=properties.cfPath}" data-sly-use.cf="${cfPath}"> <p>${cf.fieldFromCF}</p> <sly>
So, can anyone please help me to achieve the above in SPA react?
Any hint on this would be helpful.
Thanks,
sesmic
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
on spa there is not need of data sly use. Because front end is not Sightly there.
On SPA you send all the props to react/angular side. And based on the props show hide logics are on angular/react.
Generally on spa we expose all the props to react or call a servlet for backend data
Hi @kaikubad,
Yes, I agree with you. But how can I implement it SPA?
In my SPA component how could I get the field values from CF.
Views
Replies
Total Likes
@sesmic Did you find the suggestion helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies