2
votes

I'm new to orchard development and spent the last week studying it. I'm having a hard time in understanding some concepts, such as placement.info files.

I've read the article Understanding placement info from the project site and the section from the book "Orchard up and running" related to it.

What I understand:

  • Placement info files work on the content item level. It is used to reorder the rendering of the fields and content parts;

  • This file has three main tags: placement (basically a wrapper), match(which defines if the rules will be applied to the summary or detail display) and place (which effectively defines the placement rules);

What I don't understand:

  • How do I define the order of the tags? In the "place" tags I see "Content:Before", "Content:After.7", "Content:2.9" and some other rules. What does it mean to define "Place Parts_Tags_ShowTags="Header:after.7"/"? Is the placement file capable of moving parts to different zones?

I'm getting a bit frustrated using it. I don't know if I'm not using the right material (they seem very brief and/or outdated). If so, could someone suggest me some links?

I'd really appreciate some help, guys.. Thanks in advance

1

1 Answers

6
votes

The name of the attribute is the shape name (usually as returned by a part driver), and the value is where to send that shape. It is a zone name, followed by a colon, and then ordering. The zone name can start with a slash if you want to target a top-level zone (those are defined in the Layout.cshtml file), like this: /AsideSecond:1. The ordering can be a special number, or a dotted sequence. For example, 1.1 comes after 1 but before 2. 1.1.1 would come after 1.1 and before 1.2, etc. after and before can also be used to send a shape after or before everything else.

I hope this helps.