After creating a class to get desired sorted items to populate list, after making sure to type in the source correctly in the source field as code:namespace.classname, assemblyname , still results didn't come up as expected, any idea what am i missing ? is there is any config files to be added for the class for example?
-
I think you are doing something wrong. The field you are using is to provide a Sitecore Content Tree path. Are you creating any custom control or working in OOTB?– Sumit BhatiaAug 16, 2022 at 11:23
-
OOTB my reference : sitecoretweaks.wordpress.com/2017/09/12/…– Mohamed AbbasAug 16, 2022 at 11:26
-
Can you check if you are able to debug your method?– Sumit BhatiaAug 16, 2022 at 11:31
-
checked already, I can't ,tried multiple times but my breakpoint not being hit– Mohamed AbbasAug 16, 2022 at 11:45
1 Answer
The article you are following is working with the Multilist field
, not with the Multilist with Search
.
I have checked this using this class.
namespace TEST.Foundation.Common.CustomSitecore
{
public class Multilist: IDataSource
{
public Item[] ListQuery(Item item)
{
item = SitecoreData.Context.ContentDatabase.GetItem("/sitecore/content/Home");
return item.Axes.GetDescendants().ToArray();
}
}
}
Here is what I used in Sitecore