Template Naming Issues

Topics: Customizing Orchard, Writing modules, Writing themes
Apr 17, 2011 at 11:17 PM
Edited Apr 18, 2011 at 3:46 AM

I've created a simple content part with a few text fields via the user interface, and have added the part to the Page content type, but I can not seem to figure out how to properly name it's template file so that I can style the new content part appropriately.  Also, the new content part is getting rendered as part of the "Parts_Common_Body" according to the Shape Tracer, but there is no information showing in the Shape Tracer for "Parts_Common_Body."  What I also find confusing is that if I create an empty "/Views/Parts/Common.Body.cshtml" file in my theme, all my body content goes away (as expected) EXCEPT for the new content part, which still appears as Parts_Common_Body in the Shapes Tracer...?  Any insight as to what I am doing wrong?  I've been referring to the following doc, but am not clear on the content part examples:


Thanks, DanO


Apr 18, 2011 at 6:47 PM

I don't think this works for parts created through the admin, only for those created through code.

Apr 19, 2011 at 1:29 AM

So there's no way to control where or how a dynamic content part appears on the page?  When would it make sense to use a dynamic content part if you can't control their placement or layout?  Is there something I'm missing?

Apr 19, 2011 at 2:38 AM

There is, but you need to address the fields, not the part.