I am trying to make a change to the definition of a links list. Specifically, I
would like to have one of the options in my view be to display the URL in a new
window. I am very close, but I need someone to hopefully get me to that last
step.
What I have done is add a Field section to the Fields portion of the Metadata
section.
<Field ReadOnly="TRUE" Filterable="FALSE" Type="Computed"
Name="URLinNewWindow"
DisplayName="URL" DisplayNameSrcField="URL"
AuthoringInfo="(URL in New Window)" >
<FieldRefs>
<FieldRef Name="URL"/>
</FieldRefs>
<DisplayPattern>
<HTML><![CDATA[<A target=new HREF="]]></HTML>
<!-- The line below needs to change -->
<Column2 Name="URL" HTMLEncode="TRUE"/>
<HTML><![CDATA[">]]></HTML>
<Column2 Name="URL" HTMLEncode="TRUE"/>
<HTML><![CDATA[</a>]]></HTML>
</DisplayPattern>
</Field>
I have figured out that the piece of code above will add a new option to the
columns list when I create a new view or edit an existing one. However, the
display pattern I have defined renders the HTML as follows (using Yahoo.com as
an example).
<a target=new href="Yahoo Home Page">Yahoo Home Page</a>
When instead it should display as
<a target=new href="http://www.yahoo.com">Yahoo Home Page</a>
How do I get the line that I identified to render the actual URL portion of the
field, and not the URL description?