More in this section

Forums / Bugs & Issues / Category Tree and Download List Parenthesis

Category Tree and Download List Parenthesis

2 posts, 0 answered
  1. Eric
    Eric avatar
    40 posts
    10 Apr 2009
    19 Jan 2010
    Link to this post

    If I put parenthesis in a category title the links between the category tree and the download list do not work.  The category appears in the category tree correctly but when I attempt to expand and view the documents listed in the download list now documents appear.  Is there a work around for this? 

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    20 Jan 2010
    Link to this post
    Hello Eric,

    The following symbols "(", ")" and "\" in the name of a category are replaced in the ContentFilterBuilder class. There is a way to get around this, but it is quite complex

    Generally you have to remove the logic that replace the symbols and parse the rightOperand of the filterBelow are the steps that you have to follow

    1.Create a custom content filter that inherits from ContentFilterBuilder class and override ParseMetaFieldsFilter.

    sample code:

    Copy Code

    public class ContentFilterCustom : ContentFilterBuilder
        public ContentFilterCustom(IFilterableContentControl filterableControl)
            : base(filterableControl)
        public override Telerik.Cms.Engine.IMetaSearchInfo[] ParseMetaFieldsFilter()
            ContentManager manager = new ContentManager("YOUR PROVIDER HERE");
            Dictionary<string, IMetaInfo> metaFields = (Dictionary<string, IMetaInfo>)manager.MetaKeys;
            List<IMetaSearchInfo> filters = new List<IMetaSearchInfo>();
            List<IContentFilterStatement> statements = ParseInternal(true);
    foreach (IContentFilterStatement statement in statements)
                if (metaFields.ContainsKey(statement.LeftOperand))
                    // condition In or Equal
                    if (statement.Condition == ContentFilter.Condition.In)
                        string rightOperandString = statement.RightOperand;
                        MetaSearchInfo searchInfo = new MetaSearchInfo(metaFields[statement.LeftOperand].ValueType,
            return filters.ToArray();
        private IFilterableContentControl filterableControl;
        private Dictionary<string, ContentFilter.SupportedFilterTypes> supportedLeftOperands;

    2. Create a custom class that inherits from DownloadList and there use your custom filter to filter the items.

    Copy Code
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Telerik.Cms.Engine.WebControls;
    using Telerik.Cms.Engine;
    using System.Collections;
    using Telerik.Cms.Engine.ContentViewFiltering;
    using System.Web.UI.WebControls;
    /// <summary>
    /// Summary description for ContentViewCustomControl
    /// </summary>
    public class ContentViewCustomControl : ContentView
        public ContentViewCustomControl()
        public override string ItemListTemplatePath
                return "~/Sitefinity/ControlTemplates/Libraries/DownloadLitTableMode.ascx";
        protected override void CreateContentList()
            // get the right operant
            string rightOperand = parenthesis()";
            ContentFilterCustom filterBuilder = new ContentFilterCustom(this);
            IList filteredItems = null;
            if (filterBuilder.IsFilterValid)
                filteredItems =  Manager.GetContent(GetContentStartIndex(),

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered