Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Custom field html displays as text

$
0
0

I am converting a custom field from a SharePoint 2007 version to SharePoint 2013. The field works correctly in SP2007. In SP2013 it has the correct information but displays as text instead of html. I have set the "disable-output-escaping" in the xsl to "yes" but it does not help. Here the xml and xsl data for the field.

<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
  <FieldType>
    <Field Name="TypeName">PriorityIndicator2</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="TypeDisplayName">Priority Indicator</Field>
    <Field Name="TypeShortDescription">Priority Indicator</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="Sortable">TRUE</Field>
    <Field Name="AllowBaseTypeRendering">TRUE</Field>
    <Field Name="Filterable">TRUE</Field>
    <Field Name="FieldTypeClass">Company.WebParts.PriorityIndicator2, $SharePoint.Project.AssemblyFullName$</Field>
    <Field Name="FieldEditorUserControl">/_controltemplates/15/PriorityIndicator2FieldEditor.ascx</Field>
    <Field Name="CAMLRendering">TRUE</Field> 

    <RenderPattern Name="DisplayPattern">
 <Column HTMLEncode="FALSE" />
    </RenderPattern>   
 
  </FieldType>
</FieldTypes>


<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
                xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
                version="1.0"
                exclude-result-prefixes="xsl msxsl ddwrt"
                xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
                xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
                xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:SharePoint="Microsoft.SharePoint.WebControls"
                xmlns:ddwrt2="urn:frontpage:internal">

  <xsl:template match="FieldRef[@Name = 'PriorityIndicator2]" mode="Text_body">
 
    <xsl:param name="thisNode" select="." />
 
    <span style="background-color:lightgreen;font-weight:bold">
 
      <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes" />
     
    </span>
 
  </xsl:template >
 
</xsl:stylesheet>

Any help would be greatly appreciated.


Luis R. Lebron



Viewing all articles
Browse latest Browse all 25064

Trending Articles