Hi,
you could modify file: ~/CMSModules/Content/Controls/ContentTree.ascx.cs its CreateNode method. You could change "else" part of following code:
if (UseCMSFileIcons && (className == "cms.file"))
{
string extension = ValidationHelper.GetString(container.GetValue("DocumentType"), "");
imageUrl = GetFileIconUrl(extension, CMSFileIconSet);
tooltip = " title=\"" + extension.ToLower().TrimStart('.') + "\" ";
}
// Use class icons
else
{
imageUrl = ResolveUrl(GetDocumentTypeIconUrl(className));
}
and add condition for your document type (in this example is used cms.blog document type):
if (className == "cms.blog")
{
// Tree node
CMS.TreeEngine.TreeNode node = null;
// Tree provider
CMS.SiteProvider.UserInfo ui = CMS.SiteProvider.UserInfoProvider.GetUserInfo("administrator");
CMS.TreeEngine.TreeProvider tree = new CMS.TreeEngine.TreeProvider(ui);
// Get Single node specified by it`s ID
node = tree.SelectSingleNode(sourceNodeId);
string decide = ValidationHelper.GetString(node.GetValue("BlogTeaser"), "");
if (decide.Equals("some value"))
{
imageUrl = "/url/image.jpg";
}
else
{
imageUrl = "/url/image2.jpg";
}
}
Alternatively, you could decide for
cloning your document type to avoid above customization.
Best regards,
Ivana Tomanickova