The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
Now we are ready to plug in our custom logic to the client component. As I have already said I am going to filter the collection of flat taxa showed by the control, so what better way to do it than using the filterExpression of the taxon binder? I plug in my logic to the already existing function _bindMostPopularExistingTaxa and set the filterExpression, right after the dispose function:
Now build the solution and you can use the CustomFlatTaxonField throughout the modules in Sitefinity. Let’s say you want to use this functionality for the News module’s Tags. Go to Administration->Settings->Advanced->News->Controls->NewsBackend->Views->NewsBackendInsert->Sections->TaxonSection->Fields->Tags. Just change the default field type with the type of the CustomFlatTaxonField and save. Do the same for NewsBackendEdit view and then restart the application so that the new control can be initialized with the view and test it out. Registering the control for any other module is analogical to the above.
You can either extend the already existing functions, or you can write your own logic that handles any custom controls you might have added to the control template.
Here is an archive with 2 sample controls - 1 from the above example and the other (DateField), using the same technique to set timing in a 12-hour format.
I hope you find this helpful.
View all posts from Pavel Benov on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You have the right to request deletion of your Personal Information at any time.
You can also ask us not to pass your Personal Information to third parties here: Do Not Sell My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.