How to fetch a link using multifield component | Community
Skip to main content
August 30, 2022

How to fetch a link using multifield component

  • August 30, 2022
  • 1 reply
  • 2123 views

I'm trying to fetch a link using multifield component but the link is not getting rendered on the page. I have used Sling Model for this

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

ksh_ingole7
Community Advisor
Community Advisor
August 30, 2022

Hi @sanjana12 

 

Can you elaborate? Are you getting the link from Author in a Multifield widget? And are you trying to fetch it in Sling Model so that you can return it to Frontend?

Sanjana12Author
August 30, 2022
<sly data-sly-use.model="com.whiteleaf.core.models.Website">
<ul data-sly-list.item= "${model.details}">
<li>${item.socialMedia @ context='html'}</li>
<li><a href="<${item.socialMediaLink}"></a></li>

</ul>
</sly>
Sanjana12Author
August 30, 2022

Kindly check my above answer, you will have to fetch the Multifield nodes using Map in Sling Model.


I need a pathfield actually. How to render the link on the page using a pathfield?