Custom CMS page search for Editor

Vote:
 

Hi

I have been trying to implement a custom search for searching pages in the editor mode, 

But i have not manage to do it.

I have manage to do it for products in Catalog area, but not in pages.

I have try this:

[SearchProvider]
public class CustomPageSearchProvider : ISearchProvider
    {
        public CustomPageSearchProvider()
        {

        }

        public string Area => "Cms";

        public string Category => "Custom page search";

        public virtual IEnumerable<SearchResult> Search(Query query)
        {
            var list = new List<SearchResult>();
            list.Add(new SearchResult("https://www.test.com", "Test 1"));
            list.Add(new SearchResult("https://www.test.com", "Test 2"));
            return list;
        }
    }
#216505
Feb 07, 2020 11:31
Vote:
 

Hi Juan,

You can use PowerSlice addons.

https://world.episerver.com/add-ons/powerslice/

#216514
Feb 07, 2020 12:27
Juan Munoz - Feb 07, 2020 13:05
Hi Ravinda
Sorry, I need to make this work without a addons.
Vote:
 

You probably want to make sure your custom search is top of the list 

#216522
Feb 07, 2020 14:38
Vote:
 

Hi @Quan

I have allready added this in my search setting:

#216534
Feb 08, 2020 8:14
Vote:
 

This solve the problem:

public string Area => "Cms";
#216547
Feb 09, 2020 22:56
Quan Mai - Feb 10, 2020 8:06
Didn't you already have that in your question?
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.