Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Help with Schema.xml File

  Asked By: Amos    Date: May 02    Category: Sharepoint    Views: 2958

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

What I have done is add a Field section to the Fields portion of the Metadata

<Field ReadOnly="TRUE" Filterable="FALSE" Type="Computed"
DisplayName="URL" DisplayNameSrcField="URL"
AuthoringInfo="(URL in New Window)" >
<FieldRef Name="URL"/>
<HTML><![CDATA[<A target=new HREF="]]></HTML>

<!-- The line below needs to change -->
<Column2 Name="URL" HTMLEncode="TRUE"/>

<Column2 Name="URL" HTMLEncode="TRUE"/>

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?



2 Answers Found

Answer #1    Answered By: Daron Oneill     Answered On: May 02

This isn't a direct answer (sorry) but check out Andrew Connell's article on
doing the same thing:

Answer #2    Answered By: M Juarez     Answered On: May 02

That article was very useful. I figured out that what I needed to change  was in
fact the line  I identified, with the change going from
<Column2 Name="URL" HTMLEncode="TRUE"/>

<Column Name="URL" HTMLEncode="TRUE"/>

As "Column" refers to the first part of the URL field  (the hyperlink itself) and
that "Column2" refers to the second part (the description  portion).

Didn't find what you were looking for? Find more on Help with Schema.xml File Or get search suggestion and latest updates.