Hide content fields on admin summary screen

Topics: Administration, Core, Writing modules, Writing themes
Oct 1, 2013 at 2:35 PM
Edited Oct 1, 2013 at 2:35 PM
Hi there,

I have a content type "Product" with various fields associated to it.
In my theme's placement.info I have the following content
<Placement>
  <Match ContentType="Product">

    <Match DisplayType="Detail">
      <Place Parts_Title="-" />
      <Place Parts_Common_Metadata="-" />
      <Place Fields_Common_Text="-" />
      <Place Fields_Common_Text="-" />
      <Place Fields_TaxonomyField="-" />
      <Place Fields_TaxonomyField="-" />
      <Place Fields_Numeric="-" />
      <Place Fields_MediaLibraryPicker="-" />
    </Match>
    
  </Match>
</Placement>
And in the respective module, I place the product part.

This works fine.

What I am trying to do is remove the fields from the admin summary view in the dashboard.
I tried this
<Placement>
  <Match ContentType="Product">
    
    <Match DisplayType="SummaryAdmin">
      <Place Parts_Title="-" />
      <Place Parts_Common_Metadata="-" />
      <Place Fields_Common_Text="-" />
      <Place Fields_Common_Text="-" />
      <Place Fields_TaxonomyField="-" />
      <Place Fields_TaxonomyField="-" />
      <Place Fields_Numeric="-" />
      <Place Fields_MediaLibraryPicker="-" />
    </Match>

  </Match>
</Placement>
But that does not work.

Can you please tell me what I am doing wrong.

Thanks
Coordinator
Oct 1, 2013 at 7:43 PM
Your theme is not active while you're in the admin, neither is its placement file. It needs to be done from the module, a module that depends on it, or an admin theme (but those are harder than regular themes).
Oct 2, 2013 at 7:24 AM
Okay that makes sense.

But when I try to hide fields from my module it does not work.
In my module that is responsible for creating the product content type I have the following placement.info file.
<Placement>
  <Match ContentType="Product">
    <Match DisplayType="SummaryAdmin">
      <Place Parts_Product="-" />
      <Place Parts_Title="-" />
      <Place Parts_Common_Metadata="-" />
      <Place Fields_Common_Text="-" />
      <Place Fields_Common_Text="-" />
      <Place Fields_TaxonomyField="-" />
      <Place Fields_TaxonomyField="-" />
      <Place Fields_Numeric="-" />
      <Place Fields_MediaLibraryPicker="-" />
    </Match>
  </Match>
</Placement>
The placement.info file correctly hides the Parts_Product part, but the fields still display as normal.

Can you see anything that is wrong?

Thanks
Coordinator
Oct 6, 2013 at 5:54 AM
Some duplication.