0

我想在露天 aikau 搜索页面中添加自定义操作。我已经创建了扩展模块。

<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"
});

它不是在搜索结果页面单个文档中添加操作。

4

1 回答 1

0

当您想在 aikau 搜索结果页面中显示相同的操作时,您必须提供您在 share-config-custom.xml 操作中提供的相同 ID。

Ex.example-action

我提供了不同的 ID,所以它没有显示。

于 2020-04-07T10:04:44.747 回答