JazerB
JazerB

Reputation: 13

Using Orchard CMS, How do I hide items in a container content type?

I have been attempting to hide the contained items of a Page content type. I have been manipulating the placement.info file in my theme but I am not seeing the results I would expect.

Here's my bruit-force attempt:

  <Match Path="/about">
    <Match ContentType="Page">
      <Match DisplayType="Detail">
        <Place Parts_Common_ContentItems="-"/>
        <Place Parts_Container_Contained="-"/>
        <Place Parts_Container_Contained_Summary="-"/>
        <Place Parts_Container_List="-"/>
      </Match>
    </Match>
  </Match>

I have scoured StackOverflow for the answer and I have used the Shape Tracing module to give me direction on designing my placement.info file but I still seem to be missing something.

Any pointers are appreciated! Thanks.

Upvotes: 1

Views: 1066

Answers (2)

Falanwe
Falanwe

Reputation: 4744

You cannot hide the content of a container using only Placement.info because the list is rendered by its own controller (Orchard.Core.Containers.Controllers.ItemController) instead of using a shape in the standard orchard shape rendering sytem.

However you may use your own (very simple) controller to build a display without this child list.

Upvotes: 1

Bertrand Le Roy
Bertrand Le Roy

Reputation: 17814

I'd say don't put it in the container if you don't want it to appear in there. You might also want to check out taxonomies, that provide a much better and flexible approach to classifying your contents.

Upvotes: 0

Related Questions