Template Naming Issues

Topics: Customizing Orchard, Writing modules, Writing themes
Apr 18, 2011 at 12:17 AM
Edited Apr 18, 2011 at 4: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:

http://orchardproject.net/docs/Accessing-and-rendering-shapes.ashx#Naming_Shapes_and_Templates_7

Thanks, DanO

 

Coordinator
Apr 18, 2011 at 7:47 PM

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

Apr 19, 2011 at 2: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?

Coordinator
Apr 19, 2011 at 3:38 AM

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