Orchard 1.8 Unable to hide metadata (published date) from custom part using Placement.info

≯℡__Kan透↙ 提交于 2019-12-11 03:52:22

问题


I have a Placement.info at the root of my custom part folder.

<Placement>
    <Place Parts_Common_Metadata="-" />
    <Place Parts_MyCustomPart="Content:2" />
</Placement>

MyCustomPart displays fine. However, this doesn't hide the metadata. Using Shape Tracing, I managed to identify which Placement.info file was being loaded/processed that displays the metadata. It is ~/Core/Common/Placement.info containing the rule

<Placement>
    <Match DisplayType="Detail">
        <!-- Removed for brevity -->
        <Place Parts_Common_Metadata="Meta:2" />
    </Match>
</Placement>

I suspect that MyCustomPart/Placement.info was being loaded/processed first. And ~/Core/Common/Placement.info is loaded after that effectively overriding Parts_Common_Metadata in the previous Placement.info.

Is there a way to define the order of which Placement.info is loaded/process first?


回答1:


Take a dependency on "Common" from your module.txt manifest file. This will let you take precedence.



来源:https://stackoverflow.com/questions/23449507/orchard-1-8-unable-to-hide-metadata-published-date-from-custom-part-using-plac

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