This project is read-only.

Is there a way to construct table layout on content type?

Topics: Customizing Orchard, General, Writing modules, Writing themes
Feb 23, 2013 at 11:56 AM
I've try to make a new content type with three content parts located on. But i can place that content parts only as one below the other. I want to make 2 content part at one row and one content part at the next row. Is it possible? Thanks for any help...
Feb 23, 2013 at 5:45 PM
Each Content Part emits shapes, which in turn get rendered. So one way you could do it is by creating a template for the content type in question, which renders a couple of local zones, which you designate each shape to using See for more details.
Another way of course is by accessing the Parts directly from that template and render anything you want.
Feb 25, 2013 at 6:42 AM
Yes, first approach is working. Thanks for a solution!
Mar 1, 2013 at 11:53 AM
Edited Mar 1, 2013 at 11:53 AM
Sorry, can you help one more time please? If i have two same Content Field on ContentItem, is it possible set in layout different placement for that fields? It's my theme
  <!-- Customize where the shapes are rendered -->
  <Match ContentType ="TableMetadata">
    <Place Parts_ListObjectMetadata="ListObjectMetadata"/>
    <Place Fields_InspectedObjectField="EditObjectMetadata"/>
    <Place Parts_FieldMetadataPart="EditFieldsMetadata"/>
The "Field_InspectedObjectField" is shape returning by some ContentField that have rendered in place specified by "EditObjectMetadata".
But if i have another content field of same type that should be placed on another place, for example in place specified by "AddObjectMetadata", is it any way to make this by file or another way?
Mar 1, 2013 at 3:38 PM
Yes. The placements of fields can be done by field name as well (the id rather the display name). Notice the second statement in my placement file below:
<Place Fields_MediaPicker="RightContent:before"
           Fields_MediaPicker-SponsoredBy="Footer:3" />
So all media picker fields that I have in my content item go to the right hand side, and the specific SponsorBy media picker field ends up in the footer. I Hope that helps.

Mar 2, 2013 at 4:36 AM
Thanks @matt4446, i'll try it!