Add custom taxonomy to news item widget edit screen
Using Sitefinity 4.2 I have created a custom taxonomy (Geographic Location) to the Classifications section. I have added this to the News Item Create and Edit screens, what I can't find to do is add it to the widget control I add to the pages. When I drop the news control on a page and go to edit, I get the built in Categories and Tags options of course to filter my news items but I also want to filter my news items by geographic location.
Can this be added easily via the sitefinity interfaces as with the creating / implimenting in other backend pages.
Thanks
Darren
Hello Darren,
If you want to achieve this you will have to extend the ContentSelectorsDesignerView class. Its default template is located as resource in Telerik.Sitefinity.Resources.Templates.Designers.ContentView.ContentSelectorsDesignerView.ascx. In this template there are several <designers:FilterSelectorItem> elements. Here is the default one for the Tags:
<
designers:FilterSelectorItem
ID
=
"FilterSelectorItem2"
runat
=
"server"
Text="<%$Resources:Labels, ByTags %>"
GroupLogicalOperator="AND" ItemLogicalOperator="OR" ConditionOperator="Contains"
QueryDataName="Tags" QueryFieldName="Tags" QueryFieldType="System.Guid">
<
SelectorResultView
>
<
sitefinity:FlatTaxonSelectorResultView
ID
=
"FlatTaxonSelectorResultView1"
runat
=
"server"
WebServiceUrl
=
"~/Sitefinity/Services/Taxonomies/FlatTaxon.svc"
AllowMultipleSelection
=
"true"
>
</
sitefinity:FlatTaxonSelectorResultView
>
</
SelectorResultView
>