Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How to hide untranslated documents from cms desk View modes: 
User avatar
Member
Member
aneeshsiva-gmail - 7/22/2011 4:00:08 AM
   
How to hide untranslated documents from cms desk
Hi

In my site contains documents of both English and french culture. When I choose English culture in CMS Desk, the French culture documents displayed with a 'x' mark In the Tree. Is it possible to hide the documents from the tree that are not present in the current culture.

Thanks and Regards
Aneesh Sivan

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 7/22/2011 4:20:20 AM
   
RE:How to hide untranslated documents from cms desk
Hi,

I would do following modification in ~\CMSModules\Content\Controls\ContentTree.ascx.cs file in treeElem_TreeNodePopulate method to achieve such behavior:

Original code:

System.Web.UI.WebControls.TreeNode newNode = CreateNode(childNode, index, true);
e.Node.ChildNodes.Add(newNode);
index++;

New code:

if (childNode.GetValue("DocumentCulture").ToString().ToLower().Equals(CultureHelper.GetPreferredCulture().ToLower()))
{
ystem.Web.UI.WebControls.TreeNode newNode = CreateNode(childNode, index, true);
e.Node.ChildNodes.Add(newNode);
index++;
}

I hope this will help you.

Best regards,
Ivana Tomanickova