This project is read-only.

How to remove rendering of field in Admin Content List.

Topics: Writing modules
Oct 2, 2012 at 7:36 PM
Edited Oct 2, 2012 at 8:17 PM

I have a content type with a MediaPicker field attached.  In the Admin Content list I was able to overload the SummaryAdmin template for the custom part but having an issue removing the MediaPicker field from the list rendering.

I assume this can all be done from the, here is what I have currently

  <Place Parts_Product_Edit="Content:1"/>
  <Place Parts_Product="Content:1"/>
  <Place Parts_MiniCart="Content:1" />
  <Match DisplayType="SummaryAdmin">
    <Place Parts_Product_SummaryAdmin="Content:1"/>
    <Place Parts_Product="-"/>
    <Place Fields_MediaPicker__Product__ProductImage="-"/>
Oct 3, 2012 at 12:48 AM

Not sure what your question is, but I think it should be

<Match ContentType="Product">
  <Place Fields_MediaPicker-ProductImage="-"/>

Oct 3, 2012 at 2:06 PM
Edited Oct 3, 2012 at 2:06 PM

The original approach ended up being wrong after digging into the Blog and Projections modules I ended up going a different route. I am providing what I did for completeness.

  1. Provided an alternate for the custom content type SummaryAdmin, (In this case Product)
    Created: Content-Product.SummaryAdmin.cshtml  (Started out with the default: \Orchard.Web\Core\Contents\Views\Content.SummaryAdmin.cshtml)
  2. Modified view to render a Summary for Content Type Product
    // Get the particular type from the Model
    var product = (Product)contentItem.Get(typeof(Product));
   @*Render the Summary View rather than Content*@
   @if (product != null) {
       <div class="primary">@Display.Parts_Product_SummaryAdmin(ProductName: product.Name)</div>
Oct 4, 2012 at 5:52 PM


Not sure to understand too.

@MatthewDubbs is your last post is the proposal solution?

Oct 4, 2012 at 6:49 PM

I am very new to Orchard that is the path I took and got the results that I was looking for. I am also very new to CodePlex, is there some convention for marking something as the solution?

Oct 4, 2012 at 7:37 PM


I am beginner too, I don't find any way to change the status to solved.

Best regards,

Oct 4, 2012 at 8:13 PM

There isn't one. Just mention it in your message.