TitlePart in another zone on the page

Topics: Writing themes
Oct 27, 2013 at 11:06 AM
Hi all,
I found another blog post that showed me to use "/ZoneName:Position" as a placement when I would like to place something of a page in another zone.

I want to place the title into a zone named TitleSection
  <Match Type="Page" DisplayType="Detail">
    <Place Parts_Tags_ShowTags="-"></Place>
    <Place Parts_Common_Metadata="-"/>
    <Place Parts_Title="/TitleSection:0"/>
    <Place Fields_Common_Text="/TitleSection:2"/>
  </Match>
the common_Text field is showing in the TitleSection, so the "/" is doing it's work. Only the TitlePart will not show up in title Section.

I don't have any other placement files than this one. I also tried to do the placement on displayType "Detail", but it's not working for blog posts either.

I have overridden the content-page.cshtml, but I suppose this would not stop my title from being placed into the title zone?
Coordinator
Oct 28, 2013 at 6:00 AM
Show how you defined TitleSection in your layout.cshtml file.
Oct 28, 2013 at 6:58 AM
            @if (Model.TitleSection != null)
            {
                <section id="page-title" class="message-container span12">
                    @Display(Model.TitleSection)
                    <hr />
                </section>
            }
the text field is showing in the title Section, only the titlepart isn't. The Title keeps showing up in the local zone "Content" of the Page content definition.
Where can I inspect this behavior? what is a good place to place my breakpoint?

this is my Content-Page.Detail View
@Display(Model.Content)
@Display(Model.Meta)
Coordinator
Oct 28, 2013 at 8:35 AM
Does the part show if you send it to a local content zone?
Oct 28, 2013 at 6:23 PM
I just tried it out, seems that even if I place it in the Heading zone, it won't render there, but still in the content zone

HTML Output (this shows that the correct page detail view is being triggered with my changes)
<div class="zone zone-content">

<div class="header">
<!-- --> Model.Heading section    
</div>

<h1>welcome</h1>
<p>content</p>

</div>
Placement:
  <Match Type="Page" DisplayType="Detail">
    <Place Parts_Tags_ShowTags="-"></Place>
    <Place Parts_Common_Metadata="-"/>
    <Place Parts_Title="Heading:1"/>
    <Place Fields_Common_Text="/TitleSection:2"/>
  </Match>
Content-Page.Detail.cshtml:
<div class="header">
    @Display(Model.Heading)
</div>
@Display(Model.Content)

@Display(Model.Meta)
Coordinator
Oct 28, 2013 at 7:03 PM
Is anything in your placement file being taken into account?
Oct 28, 2013 at 8:11 PM
yes, the rule beneat the title part is actually working as it should, the Fields_Common_Text part is being added to global zone "TitleSection"

<Place Fields_Common_Text="/TitleSection:2"/>

Where can I inspect the placement code?
Oct 28, 2013 at 8:14 PM
By the way, When I place it in the Header zone, my Model (in shape tracing) does only contain Content as zone, in there the title is always located, even when I remove it from the placement with a "-"
Oct 28, 2013 at 9:04 PM
Hmmmm, now I'm seeing text fields in a my "product" content type being displayed in the TitleSection, so something must be wrong with using the "/" for placing fields or parts into the global zones? the
<Place Fields_Common_Text="/TitleSection:2"/>
is between match tags <Match Type="Page" DisplayType="Detail">
but now I'm seeing other detail displays also giving the text fields in the TitleSection.
Coordinator
Oct 28, 2013 at 9:18 PM
I don't see how, but if you're seeing the same Place work without the slash and not with it, then please file a bug.