Return to doc.sitecore.com

Valid for Sitecore 5.3.1
14.  ServerFile
Prev Next

The complex field type, Security stores it raw value as text:

  /global.html

Resolve the value by using simple field resolve: 

public static string outServerFile(Sitecore.Data.Items.Item item, string sFieldName)
{
  System.Text.StringBuilder builder
= new System.Text.StringBuilder();
  builder.Append(
"Server files are stored as text: " + item.Fields[sFieldName]);
  
return builder.ToString();
}

Result:

Server files are stored as text: /global.html

 


Prev Next