2
votes

In Orchard I have a placement.info file that should hide the Title part when I view an Author:

<Match ContentType="Author">
    <Place Parts_Title="-" />
    <Place Parts_Breadcrumbs="-" />
</Match>

Author is a custom content type I've created and the Breadcrumbs Part is a custom part.

The breadcrumbs part is hidden, but the title is still displayed. If I inspect it with Shape Tracing it is definitely Parts_Title I want to remove, but the content of my placement file doesn't seem to work.

Any ideas?

2
Are you sure that title is being rendered by that shape in your case?Bertrand Le Roy
The Shape Tracing module reports the Shape name as Parts_Title and the Active Template as ~/Core/Title/Views/Parts.Title.cshtml. If I create an empty file called Views\Parts\Title-Author.cshtml the title is hidden. I just can't get it to work from inside Placement.infogreg84

2 Answers

0
votes

I do not have a whole of example to go on there, but it seems to me that this part is conflicting with the Parts_Title that ships with orchard.
Try extending the modifier in your placement as well as your shapes to something like:

Parts_MyModule_Title

This just adds some more clarity and can keep orchard from stepping all over itself.

0
votes

Similar problem here.

This is because your custom part's Placement.info was loaded first and Orchard Title part was loaded after that overriding it.

To solve it, in your custom part's Module.txt, put a dependence on Title. This will force Orchard Title to be loaded first before your custom part.