Placement help in 1.7

Topics: Writing themes
Aug 3, 2013 at 9:02 PM
Hey guys,

Could use a little assistance with placing a shape. On BlogPost Detail, I'm trying to place a shape under the blog post, but before the Comments. I attempted placement like this
  <Match ContentType="BlogPost">
    <Match DisplayType="Summary">
      <Place Parts_Tags_ShowTags="-"/>
    </Match>
    <Match DisplayType="Detail">
      <Place Parts_Tags_ShowTags="-"/>
      <Place Parts_Comments_Count="Meta:after"/>
      <Place Parts_Share_ShareBar="Content:after:1"/>
      <Place Parts_Comments="Content:after:2"/>
      <Place Parts_NextPreviousLinks="Content:after:3"/>
    </Match>
  </Match>
but the ShareBar appears after the Comments. When I turned on Shape Tracing, it appears that there is a Content portion in the Comments shape and it seems to want to place it after that, which ends up being after the comments. If I change the placement to Content:before, then it places it before the actual blog content (which is what I would expect using Content:before)

Is there a way to tell it in placement WHICH Content portion to place itself after so that Content:after chooses the blog post content instead of the comments content?

Or is there a different way to define placement for this item.

As always, thanks for any assistance.
Aug 3, 2013 at 10:31 PM
Hi,

the second colon might be the problem. Instead of

<Place Parts_Share_ShareBar="Content:after:1"/>
<Place Parts_Comments="Content:after:2"/>
<Place Parts_NextPreviousLinks="Content:after:3"/>

try

<Place Parts_Share_ShareBar="Content:after.1"/>
<Place Parts_Comments="Content:after.2"/>
<Place Parts_NextPreviousLinks="Content:after.3"/>

alternatively, you can use other local zone names than Content, like Footer, Header...

<Place Parts_Share_ShareBar="Content:after"/>
<Place Parts_Comments="Footer/>
<Place Parts_NextPreviousLinks="Footer:after"/>

This will render a different structure, bu in the order you want.


Developer
Aug 3, 2013 at 11:25 PM
In the Comments module, placement.info, there are 2 other shapes :
<Match DisplayType="Detail">
<Place Parts_ListOfComments="Content:10.2" />
<Place Parts_CommentForm="Content:10.3" />
</Match>
Marked as answer by psenechal on 1/28/2014 at 11:42 AM
Aug 4, 2013 at 5:26 PM
AH! I was still thinking with v1.6 shapes. Thanks agriffard...it didn't even occur to me that the shapes for comments have been changed and needed to be changed in placement. Your placement settings above placed the share bar exactly where I wanted. THANKS!