You cannot have more than one category associated with the same content item, but you may have another metakey that acts in the same way as the default Category field. In this case you can reuse the logic for CategoriesField control that is represented as a DropDownList when you create a new item or edit an item that has already been uploaded. When you upload a new item you are automatically redirected to LibraryItemEdit view. The item ID is appended as Param QueryString, so you can easily access it and pass it to LibraryManager.GetContent method.
1. Map LibraryItemEdit
2. Add second control of type ContenmetaFields
inside this template.
3. Subscribe for Save button - Click event.
4. Inside Click event get the content item LibraryManager.GetContent
5. Find the newly added ContenmetaFields
control and get its value - you could use RadComboBox
control bound to AllCategories
. You can get all categories by using GetCategories
method of LibraryManager
6. Call contentItem.SetMetaData
method to persist the value of the second ContenmetaFields
Note that this way allows you to reuse the built in CategoriesView - both ContenmetaFields
will be populated from the same source.
If the built-in categories does not meet your needs you have to create a custom hierarchical structure and use in the the same way as described above.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.