Alfresco - Aikau Custom Action

旧街凉风 提交于 2020-04-17 21:33:32

问题


I want add custom action in alfresco aikau search page. I have created extension module.

<extension>
<modules>
    <module>
        <id>Custom Action In Search Result Page</id>
        <auto-deploy>true</auto-deploy>
        <version>1.0</version>

        <customizations>
            <customization>
                <targetPackageRoot>org.alfresco.share.pages.faceted-search
                </targetPackageRoot>
                <sourcePackageRoot>com.custom.faceted-search</sourcePackageRoot>
            </customization>
        </customizations>
    </module>


    <module>
        <id>Tutorial widgets</id>
        <version>1.0</version>
        <auto-deploy>true</auto-deploy>
        <configurations>
            <config evaluator="string-compare" condition="WebFramework"
                replace="false">
                <web-framework>
                    <dojo-pages>
                        <packages>
                            <package name="search" location="js/search" />
                        </packages>
                    </dojo-pages>
                </web-framework>
            </config>
        </configurations>
    </module>
</modules>

faceted-search.js

    var searchResultPage = widgetUtils.findObject(model.jsonModel.widgets, "id", "FCTSRCH_SEARCH_RESULT");

if(searchResultPage != null) {
    searchResultPage.config = {
        enableContextMenu : false,
        mergeActions : true,
        additionalDocumentAndFolderActions : ["example-action"]
    }
}

model.jsonModel.widgets.push({
    id: "EXAMPLE_LISTENER",
    name:"search/action"
});

It is not adding action in search result page individual document.


回答1:


When you want to display same action in aikau search result page then you have to provide same id which you have given in share-config-custom.xml action.

Ex.example-action

I was providing different Id so it was not displaying.



来源:https://stackoverflow.com/questions/60750810/alfresco-aikau-custom-action

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!