We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure ISearchableTree is working and used in the back office
(will be part of PR #3852)
child of #3530
The text was updated successfully, but these errors were encountered:
Confirmed this now works. An example of how this would work (this is prior to the DI branch being merged in, so this syntax may change)
In a Compose method of an IUmbracoComponent you could do this to replace the content search:
Compose
IUmbracoComponent
var searchableTreeCollectionBuilder = composition.Container.GetInstance<SearchableTreeCollectionBuilder>(); searchableTreeCollectionBuilder.Exclude<ContentTreeController>(); searchableTreeCollectionBuilder.Add<MySearchableTree>();
and then include your own class, for example:
private class MySearchableTree : ISearchableTree { public string TreeAlias => Constants.Trees.Content; public IEnumerable<SearchResultEntity> Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null) { totalFound = 1; return new[] { new SearchResultEntity { Id = 123, Name = "Hello world", Key = Guid.NewGuid(), Score = 1, } }; } }
Sorry, something went wrong.
See #3534 for other testing notes
zpqrtbnk
No branches or pull requests
Ensure ISearchableTree is working and used in the back office
(will be part of PR #3852)
child of #3530
The text was updated successfully, but these errors were encountered: