SkyBlue
SkyBlue

Reputation: 277

How to create a search Action in Alfresco

I am using Alfresco Enterprise 6.2. Similar to the live search, I am creating a search Action for folders that I have in document library.

I have updated the custom-actions.js as follows:

onActionSearch: function dla_onActionSearch(record){
        window.open(Alfresco.constants.PAGECONTEXT +'dp/ws/faceted-search?', "_self");       
}

I have also added folder scope in faceted-search.get.js as below. I have hardcoded the value folder1 just to test if it works:

  scopeOptions.push({
  id: "FCTSRCH_SET_FOLDER_SCOPE",
  name: "alfresco/menus/AlfCheckableMenuItem",
  config: {
    label: "folder",
    value: "folder1",
    group: "SEARCHLIST_SCOPE",
    publishTopic: "ALF_SEARCHLIST_SCOPE_SELECTION",
    checked: false,
    hashName: "scope",
    publishPayload: {
     label: "folder",
     value: "folder1"
    }
  }
});

However it dos not consider the folder scope when performing the search. Instead, it consider 'folder1' as a site. How can I correctly perform a search within folder scope?

Upvotes: 6

Views: 213

Answers (1)

Sanjay
Sanjay

Reputation: 2493

Please check below widget,It is considering scope as a siteId always.

https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfSearchList.js_.html

Upvotes: 2

Related Questions