Orchard shows all fields/part in admin blog posts list, can it be disabled?

Topics: Administration, Core, Customizing Orchard
Sep 10, 2014 at 6:53 PM
My blog post has added some custom field including one for image. Can I stop Orchard from displaying these in all posts view? Especially images take a lot of space and if I would want to add another image, my mouse scroll button will die...

Image

Can this view be somehow customized?

Thanks
Coordinator
Sep 10, 2014 at 7:23 PM
Yes, you can edit the placement.info file of the TheAdmin theme, something like
 <Match DisplayType="SummaryAdmin">
    <Place Parts_Image_SummaryAdmin="-" />
  </Match>
Sep 10, 2014 at 7:48 PM
Thanks for such a quick response. It did not occur to me that it could be that easy... I ended up modifying Content-BlogPost.SummaryAdmin.cshtml though.

If anyone ever needs to accomplish this, just delete:
@if (Model.Content != null) {
    <div class="primary">@Display(Model.Content)</div>
    }
Btw for customizing blog posts you need to look into Modules -> Orchard.Blogs
Coordinator
Sep 10, 2014 at 8:16 PM
I think my solution is better on the long term as yours will still trigger the content to be generated but won't be rendered. My solution will prevent the content from being fetched or generate any content.
Sep 10, 2014 at 8:41 PM
I believe you, but I couldn't accomplish it with placement info. There isn't line that represents this part of summary. I tried many times to sufficiently understand placement.info but found modifying files more flexible and reliable...
Sep 10, 2014 at 9:25 PM
You should use the placement.info as sebastionros implies.

Enable the shapetracing feature, and view a blogpost with an image on the front end of the site. Then use the shape tracer to see which part or field is holding the image.

Then you can just add a section in your theme's placement.info:
<Placement>
    <Match DisplayType="SummaryAdmin">
        <Place Fields_YourImageField="-" /> <!-- If it is a field -->
        <Place Parts_YourPartThatHasTheImage="-" /> <!-- If it is a part -->
    </Match>
</Placement>