Placement info for specific element

Topics: Core, Writing themes
Sep 28, 2014 at 8:16 PM
So I'm changing my Summary details on a Content Type.

I have two projections of this item but my Summary is different between them. One is a small widget where I'm not going to show a Body_Summary at all, just a small list of 5 newest. And then I want a standard summary, just removing the ContentTranslation part.

Can I aim a Match against something specific like that or am i forced to do it in a Shape?
<Match ContentType="News" DisplayType="Summary">
    <Place Parts_Localization_ContentTranslations_Summary="-" />
  </Match>

<Match ContentType="News" DisplayType="Summary" somethingMoreSpecific="Widget name or zone?">
    <Place Parts_Localization_ContentTranslations_Summary="-" />
    <Place Common_Body_Summary="-" />
  </Match>
Developer
Sep 28, 2014 at 9:27 PM
Or you can add an additional Layout to your Query, and use that layout in your projection. Depending on the Layout you choose, you can provide your own DisplayType, e.g. "SummarySmall", and configure Placement.info accordingly (and you could even create shape templates for that display type).
Sep 28, 2014 at 11:18 PM
sfmskywalker wrote:
Or you can add an additional Layout to your Query, and use that layout in your projection. Depending on the Layout you choose, you can provide your own DisplayType, e.g. "SummarySmall", and configure Placement.info accordingly (and you could even create shape templates for that display type).
Yeah, I've used Shape layouts before, and I am somewhat comfortable with Shapes (though the dynamic model can sometimes be a bother, trying to located the correct properties).

I just wanted to be sure there wasn't something I was missing from Placement, there is a Path attribute I could use, but I don't find that to be a really clean solution.
Developer
Sep 29, 2014 at 2:49 AM
I agree, the Path attribute is not very clean compared to using a different query layout. Note that you don't have to use the Shape layout - if I am not mistaken, the List layout lets you specify a DisplayType as well.
Feb 23, 2015 at 9:45 PM
I'm revisiting this problem, it was mentioned I could create my own DisplayType. I have not been successful in doing so.

I tried to go into the query, I added a new layout. I tried both Shape and HTML list.

I gave the DisplayType the name "MiniSummary" and saved it to the query.

I also changed to projection to use this query layout instead of the default one.

According to ShapeTracer the DisplayType is still Summary. What am I doing wrong?
Feb 23, 2015 at 10:32 PM
My bad, this works fine.

The projection was elsewhere, this was a projection widget I was supposed to change the layout in.