I'm making a Page Layout in SharePoint Designer 2010.

I have, as part of the content type for this Page Layout, a field of type Hyperlink.

I want to use the "Description" and actual URL stored in this field in separate and different ways.

If I use this:

<SharePoint:FieldValue FieldName="LinkTest" runat="server"></SharePoint:FieldValue>

Then I still get the full <a href="... rendered.

What I want is to be able to render just the http://... or the Description for use.


I'm using jQuery UI tabs to render some tabs. The tabs will be defined by the user entering in URLs into 3 fields, one field for each tab. Each tab contains an iframe, the url to which is defined in the field associated with this tab. This works great with simple Text fields, but the "names" of the tabs are static. I'd like to use the Description of the URL as the name of the tab, and the URL of the URL field as the src for the iframe.

2 Answers 2


Another possible solution is to just setup two text field instead of using the url field. I'm not sure if that would work for what you described, though.

  • See my comments to Marc, it will actually be simpler this way.
    – James Love
    May 24, 2011 at 19:33

You could certainly parse it out with script. It sort of depends on what "use the 'Description' and actual URL stored in this field in separate and different ways" means.

With jQuery, you could get the href and replace the link with that text. Something like this (untested):

var theLink = $("a[Title='LinkTest']");
$(theLink).replaceWith("<span>" + $(theLink).attr("href") + "</span>");
  • Yeah I do use jQuery elsewhere in the page, I'll update my answer with more details...
    – James Love
    May 24, 2011 at 19:25
  • For this requirement, does it make sense to use two text columns instead of a link column? Meaning two text columns for each "URL": the Description and the URL. May 24, 2011 at 19:29
  • Yeah, it might simpler, and I did consider this method. It'll mean a lot less code, too. Cheers!
    – James Love
    May 24, 2011 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.