I have a field in my list, which is a url (field type is single line of text), and in my JSLink, I want to retrieve this field to assign it as src for an image, but when I use CurrentItem.SrcUrl, it brings something like this: url, which is not the url that I need, I would just need the url value, what do I do in this case?
-
is it a custom column? did you map the property on your web part?– Salvatore Di FazioCommented Apr 23, 2014 at 10:41
-
I don't have a web part, I am using JSLink to read the column, the column type is single line of text but contains a url, it's retrieved as <a href ... is there a way to get the url directly from this column?– SharePoint FreakCommented Apr 23, 2014 at 12:50
Add a comment
|
1 Answer
If you have a SPFieldUrl
called Foo then you should have a the url in CurrentItem['Foo']
and the description in CurrentItem['Foo.desc']