Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>All the examples I've seen of calling a URL field to be displayed as an image have been through C# code. Which is quite annoying since most of web part bits can be written without using C# code. You might also need to go down that road here... perhaps a custom field control or user control.</p> <p>Even if your code above did get the value for HeaderImageUrl, it wouldn't work as Url values are (confusingly):</p> <p>[the actual url specified][some wierd delimeter string][the description field of the url (usually the actual url again if your don't specify it)]</p> <p>So you would need to split the string with te delimeter values and use the [0] (the first) as what you inject into your image url.</p> <p>Please do post if you find a way to do this without writing C# code.</p> <p>p.s. Have you considered using a DataFormWebPart which has a xsl section in which you might be able to do extractly what you need?!</p> <p>Example: You can stick the following syntax into any aspx / ascx file:</p> <pre><code>&lt;%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&gt; &lt;%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&gt; &lt;%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&gt; &lt;WebPartPages:DataFormWebPart runat="server" IsIncluded="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="0" Title="My List Display" Default="FALSE" ID="dfwp_MyListDisplay" DisplayName="My List Display"&gt; &lt;DataSources&gt; &lt;SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" selectcommand='&amp;lt;View&amp;gt;&amp;lt;Query&amp;gt;&amp;lt;Where&amp;gt;&amp;lt;Eq&amp;gt;&amp;lt;FieldRef Name=&amp;quot;Category&amp;quot;/&amp;gt;&amp;lt;Value Type=&amp;quot;Text&amp;quot;&amp;gt;Header&amp;lt;/Value&amp;gt;&amp;lt;/Eq&amp;gt;&amp;lt;/Where&amp;gt;&amp;lt;/Query&amp;gt;&amp;lt;/View&amp;gt;' id="Utility_x0020_Navigation1"&gt;&lt;SelectParameters&gt;&lt;WebPartPages:DataFormParameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="My List Display"/&gt; &lt;asp:Parameter Name="ListName" DefaultValue="LIST NAME" /&gt; &lt;asp:Parameter Name="WebUrl" DefaultValue="&lt;% $SPUrl:~SiteCollection/ %&gt;" /&gt; &lt;/SelectParameters&gt; &lt;/SharePoint:SPDataSource&gt; &lt;/DataSources&gt; &lt;ParameterBindings&gt; &lt;ParameterBinding Name="dvt_apos" Location="Postback;Connection"/&gt; &lt;ParameterBinding Name="PageURL" Location="ServerVariable(URL)" DefaultValue=""/&gt; &lt;ParameterBinding Name="SiteUrl" Location="ServerVariable(SERVER_NAME)" DefaultValue=""/&gt; &lt;/ParameterBindings&gt; &lt;datafields&gt;@Title,Title;@URL,URL;@Category,Category;@Parent_x0020_item,Parent_x0020_item;@Sort_x0020_Order,Sort Order;@ID,ID;@ContentType,Content Type;@Modified,Modified;@Created,Created;@Author,Created By;@Editor,Modified By;@_UIVersionString,Version;@Attachments,Attachments;@File_x0020_Type,File Type;@FileLeafRef,Name (for use in forms);@FileDirRef,Path;@FSObjType,Item Type;@_HasCopyDestinations,Has Copy Destinations;@_CopySource,Copy Source;@ContentTypeId,Content Type ID;@_ModerationStatus,Approval Status;@_UIVersion,UI Version;@Created_x0020_Date,Created;@FileRef,URL Path;&lt;/datafields&gt; &lt;xsl&gt; YOUR XSLT HERE &lt;/xsl&gt; &lt;/WebPartPages:DataFormWebPart&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload