Add Custom Taxonomies to a Designer

January 02, 2013
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. http://www.sitefinity.com/blogs/joshmorales/posts/josh-morales-blog/2011/08/01/5_things_useful_examples_of_the_sitefinity_viewmap

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.


Image Description

Steve McNiven-Scott

Best\Only Blogger on this site. Therefore defacto blogger of the year Award Winner.