Recently, in my project, I had a requirement where, I had to show Items in a list dynamically based on its parent, and we are currently using Multi list with search, and I found it's better to use a custom data source as the query and fast query doesn't work for my case, so, I used the "code" Data source as it's the best solution for my case Below is an example of how I implemented this approach: Case: My case was to map the department with it's company, so I put the path of the company on the parent of the department Code: firstly, you have to add reference for Sitecore.Bucket.dll as we will implement IDatasource interface public class DepartmentCustomDataSource : IDataSource { public Item[] ListQuery(Item item) { // department company Item parent = item.Parent...
Comments
Post a Comment