Copied to clipboard

Flag this post as spam?

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


  • Ras 66 posts 330 karma points
    Sep 15, 2023 @ 07:24
    Ras
    0

    Searching on custom field on media items in the media library?

    Hi, I've added a custom field to media items for year. But I've noticed when using the search you can't search on this field, it only searches on the media item name. Is this something I'm able to make the search include? If so, where can I edit this?

  • Marc Goodson 2157 posts 14435 karma points MVP 9x c-trib
    Sep 15, 2023 @ 08:54
    Marc Goodson
    0

    Hi Ras

    Are you talking about the Backoffice Search?

    If so, then yes you can update the list of UmbracoTreeSearcherFields for Media and add your customer, properties to be searched there.

    How you do it varies depending on the version of Umbraco you are running, so on the VLatest Dot Net Core versions there is an example here:

    https://docs.umbraco.com/umbraco-cms/extending/backoffice-search#adding-custom-properties-to-backoffice-search

    In V8.6, it's slightly different:

    https://our.umbraco.com/Documentation/Extending/Backoffice-Search/#adding-custom-properties-to-backoffice-search

    regards

    Marc

  • Ras 66 posts 330 karma points
    Sep 15, 2023 @ 09:48
    Ras
    0

    Hi Marc,

    Well, I was thinking specifically about the search contained in the backoffice media library as opposed to the global search, if that makes sense.

  • Marc Goodson 2157 posts 14435 karma points MVP 9x c-trib
    Sep 18, 2023 @ 11:35
    Marc Goodson
    100

    Hi Ras

    Ahhh, you mean in the ListView? that search within the media section...

    Have a look at this article:

    https://dev.to/skttl/how-to-customize-searching-in-umbraco-list-views-1knk

    It applies to a custom search of a custom ListView but the concept will be the same for doing so on Media, it's a question of finding which request to hook into by opening up dev tools and looking to see what it's currently requesting when search is actioned...

    regards

    Marc

  • Ras 66 posts 330 karma points
    Sep 20, 2023 @ 07:00
    Ras
    0

    Hi Marc,

    Thank you, it seems like a good starting point for what I need!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies