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

StackOverflow https://stackoverflow.com/questions/23449507

  •  14-07-2023
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top