Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andy Felton 185 posts 484 karma points c-trib
    Aug 25, 2021 @ 16:09
    Andy Felton
    0

    Modify searched fields in back office

    Hi,

    I'm wanting to adjust the searched fields in the backoffice to add a reference field. I've implemented code as per https://our.umbraco.com/Documentation/Extending/Backoffice-Search/ as follows:

    public class CustomUmbracoTreeSearcherFields : UmbracoTreeSearcherFields, IUmbracoTreeSearcherFields
    {
        public IEnumerable<string> GetBackOfficeFields()
        {
            return new List<string>(base.GetBackOfficeFields()) { "reference" };
        }
    }
    

    Issue is I never see the GetBackOfficeFields function called, do I need to register it somewhere?

    Thanks Andy

Please Sign in or register to post replies

Write your reply to:

Draft