public override void Display(DisplayElement d_element)
{
Item itemElement = null;
if (d_element.Element is Item)
{
itemElement = (Item)d_element.Element;
}
else if (d_element.Element is ID)
{
itemElement = Sitecore.Context.ContentDatabase.GetItem(d_element.Element as ID);
}
if (itemElement == null)
{
return;
}
d_element.Value = itemElement.Uri.ToString();
d_element.Header = itemElement.Name;
foreach (var column in Columns)
{
if (!d_element.HasColumn(column.Header))
{
var text = getColumnText(column.Name, itemElement);
d_element.AddColumn(column.Header, string.IsNullOrEmpty(text) ? itemElement[column.Name] : text);
}
}
d_element.Icon = itemElement.Appearance.Icon;
}