2017-02-27 61 views

回答

1

要將新自定義組添加到駕駛艙你需要遵循一些具體的指示。

  1. 首先,在[custom]cockpits\resources\[custom]cockpits-config\[custom_group]\editorArea_[custom_item].xml添加以下片段:

[custom_group]:可能是AdminGroup的或例如cockpitgroup
[custom_item]:可能是產品MyProduct或任何其他項目。

例如:mycockpits\resources\mycockpits-config\admingroup\editorArea_Product.xml

<custom-group class="de.hybris.platform.cockpit.services.config.impl.ClassAttrEditorSectionConfiguration" qualifier="my_new_section" initially-opened="true" show-if-empty="true" visible="true"> 

    <label lang="de">Section name [DE]</label> 
    <label lang="en">Section name [EN]</label> 
    <label lang="fr">Section name [FR]</label> 

</custom-group> 

:應該是實施CustomEditorSectionConfiguration和從DefaultEditorSectionConfiguration延伸。
預選賽:不應該包含空格。

  • 運行螞蟻,然後從HAC與項目數據執行更新用於擴展mycockpits檢查:

    enter image description here

  • 注意:在某些情況下,更新可能不是必需的。

  • 最後,從/productcockpit重置個性化設置

    enter image description here

  • 那麼你現在應該可以看到新的章節。

    1

    以上說明寫得很好,但是這真的是你想要的嗎?你寫了一些關於「如何添加自定義SECTION」的內容。

    所以,如果你是在談論這個東西在這裏: enter image description here

    如果你想加入這樣的東西,你必須例如像在這裏的editorArea_xxx做的事情。xml文件:

    \t <group qualifier="admin" visible="true" initially-opened="false"> 
     
    \t \t <label key="config.general.administration" /> 
     
    \t \t <property qualifier="CMSItem.uid"/> 
     
    \t \t <property qualifier="AbstractCMSComponent.slots"/> 
     
    \t \t <property qualifier="AbstractCMSComponent.container"/> 
     
    \t \t <property qualifier="Item.pk" /> 
     
    \t \t <property qualifier="Item.creationTime" /> 
     
    \t \t <property qualifier="Item.modifiedtime" /> 
     
    \t </group>

    比執行步驟2)和3)從Mouad EL法基爾answear。

    BR

    相關問題