Can't get placement quite right inside of blog

Topics: Writing themes
Jul 18, 2013 at 6:53 AM
Edited Jul 18, 2013 at 6:54 AM
I hate to keep coming back asking, but this is quite possibly the last thing I need to figure out. I'm working on writing the theme, and I'm almost done, but the blog is making me bash my head against the keyboard.

I'll give a basic explanation of what I'm trying to achieve.

My site has several sections but it basically goes in a rather simple hierarchy:
...............................................
Logo---------------Picture
..............................................
-------Navigation---------
----Title-------------------
---------Content----------
---------Content----------
----------Footer-----------

Now on every page, my placement file works correctly, except for the blog. When on the blog page, the title should display "Blog", but when I click on a blog entry, it should change to say the title of the blog. This works sorta. I'm running into a funny issue that when I try to define the placement for BlogPost, it causes The titles for all the blogs to appear when I navigate to the blog page, but it displays correctly when inside an actual blog post. When I remove the code, it displays properly inside of the main blog page, but doesn't appear in the correct position when I enter the blog.

Placement.info:
<Placement>
    <Match ContentType="Blog">
        <Match DisplayType="Detail">
            <Place Parts_Common_Metadata="-"/>  
        </Match>
        <Match DispalyType="Title">
            <Place Parts_Title="/PageTitle:1"/>
            <Place Parts_Common_Metadata="-" />
        </Match>
    </Match>
    <Match ContentType="Page">
        <Match DisplayType="Summary">
            <Place Parts_Common_Metadata="-"/>
        </Match>
        <Match DisplayType="Detail">
            <Place Parts_Common_Metadata="-"/>  
        </Match>
        <Match DispalyType="Title">
            <Place Parts_Title="/PageTitle:1"/>
            <Place Parts_Common_Metadata="-" />
        </Match>
    </Match>
        <Match ContentType="BlogPost">
        <Match DispalyType="Title">
           <Place Parts_Title="/PageTitle:1"/>
        </Match>
        <Match DisplayType="Summary">
     <Place Parts_Comments_Count="Content:after"
            Parts_Common_Body_Summary="Meta:3"/>
        </Match>
    </Match>
</Placement>
Jul 18, 2013 at 10:42 AM
Edited Jul 18, 2013 at 10:43 AM
There is no DisplayType="Title" that you can match. The display type can be Summary or Detail. Plus you've spelt DisplayType wrong a few times.

I don't think that will solve your problem, but removing the errors from this placement file might help.

I'm not sure what you mean when you say:

"it causes The titles for all the blogs to appear when I navigate to the blog page"

Do you mean they appear in the head title tag or they appear in the title zone you've set up in your theme?
Jul 18, 2013 at 3:01 PM
Edited Jul 18, 2013 at 3:05 PM
It essentially duplicates the titles of the blogs that are listed and assigns them the type of Parts_Title. When I remove the blogpost code, I only have 1 title listed, when I have it in place, there are now multiple headers.


Edit:

Apparently, fixing the typos and restructuring did help. For what reason, I have no idea, but it's working now.
<Placement>
    <Match ContentType="Blog">
        <Match DisplayType="Detail">
            <Place Parts_Title="/PageTitle:1"/>
            <Place Parts_Common_Metadata="-" />
        </Match>
    </Match>
    <Match ContentType="Page">
        <Match DisplayType="Summary">
            <Place Parts_Common_Metadata="-"/>
        </Match>
        <Match DisplayType="Detail">
            <Place Parts_Title="/PageTitle:1"/>
            <Place Parts_Common_Metadata="-"/>  
        </Match>
    </Match>
    <Match ContentType="BlogPost">
        <Match DisplayType="Detail">
           <Place Parts_Title="/PageTitle:1"/>
        </Match>
        <Match DisplayType="Summary">
            <Place Parts_Comments_Count="Content:after"
            Parts_Common_Body_Summary="Meta:3"/>
        </Match>
    </Match>
</Placement>