Published on

Add Custom Taxonomies to a Designer

Authors

Props for this to Rado, and hopefully this “hack” will be obsolete once they implement it into the UI native.

--------------------

  1. Use the ViewMap. Host type is Telerik.Sitefinity.Web.UI.ControlDesign.DynamicContentSelectorsDesignerView. Sitefinity Blog Post

  2. The change you need to do is add one more FilterSelectorItem in the Items collection of the Filter selector

<designers:FilterSelectorItem ID="FilterSelectorItem11" runat="server" Text="By Submission Type"
    GroupLogicalOperator="AND" ItemLogicalOperator="OR" ConditionOperator="Contains"
    QueryDataName="submissiontypes" QueryFieldName="submissiontypes" QueryFieldType="System.Guid">
    <SelectorResultView>
        <sitefinity:FlatTaxonSelectorResultView ID="FlatTaxonSelectorResultView1" runat="server" 
            TaxonomyId="8C310B34-2E2D-4085-B252-90D4EE13E34E" 
            WebServiceUrl="~/Sitefinity/Services/Taxonomies/FlatTaxon.svc"
            AllowMultipleSelection="true">
        </sitefinity:FlatTaxonSelectorResultView>
    </SelectorResultView>
</designers:FilterSelectorItem>

Depending on the taxonomy type (Flat or Hierarchical) you need to decide what kind of selector to use. You can pretty much copy the markup for categories for example and just change field names and taxonomy ids.

This approach is applicable for all widgets such as news, blog posts, etc.

Boost your online presence.

Let us create the perfect digital experience for your company.

Contact us now