htl code to get link on a page injected by sling model . provided below snapshot of my htl code, I am doing right way?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Dvaraka ,
What is the exact issue? Do you want to add an extension to your injected URL ? or URL itself is not getting injected? Could you please give us more clarity on this? and please share your sling model also.
One more thing why you are passing ${textmodel.customtextarea} in href? it should be ${textmodel.link}.
Thanks
Hi,
Use @CONTEXT='html' or uri for anchor tags
Adds the html extension to a path.
<a href="${item.path @ extension = 'html'}">${item.name}</a>
For more information about context attributes, you can refer below link
Hi @Dvaraka ,
What is the exact issue? Do you want to add an extension to your injected URL ? or URL itself is not getting injected? Could you please give us more clarity on this? and please share your sling model also.
One more thing why you are passing ${textmodel.customtextarea} in href? it should be ${textmodel.link}.
Thanks
@Dvaraka As @MayurSatav mentioned , you are actually printing the wrong property in the link. Instead of ${textmodel.custometextarea} you should use the property name you have given to the link field .
Views
Likes
Replies