Using Alternate in Placement not working

Topics: Troubleshooting
Aug 19, 2011 at 11:13 AM
Edited Aug 19, 2011 at 11:13 AM

Ok I have a custom type called OliverContent which has a BodyPart and when it renders with display type  Summary I would like to override the default Parts_Common_Body_Summary to one of my own templates (actually the same one I use when rendering the detail display).  So in my Placement file I have the following:

 

    <Match ContentType="OliverContent" DisplayType="Summary">
        <Place Parts_Common_Body_Summary="Content:after;Alternate=Parts.Common.Body-OliverContent"/>
        <Place Parts_Common_Metadata_Summary="-" />
        <Place Fields_Contrib_Image="Content:2.4"/>
    </Match>

However when it renders it still shows the html rendered from the original template (Parts_Common_Body_Summary).  However when inspecting the element using the Shape Tracing tool it shows that it *is* using the alternate template and shows the correct template content but the html is incorrect.

Images....

https://lh6.googleusercontent.com/-l8kOROJ0_Go/Tk41Fp6Je-I/AAAAAAAAAJc/eykvebajqHU/s800/alternate1.png

https://lh6.googleusercontent.com/-6jfI3l1WbiE/Tk41FcziK1I/AAAAAAAAAJU/2e8SHR0861Q/s800/alternate2.png

https://lh6.googleusercontent.com/-fawAeghzF0E/Tk41FVq6RBI/AAAAAAAAAJY/0tXN5xJ3QOQ/s800/alternate3.png

For now I have just created one of the suggested alternate templates, which works, but not the solution I was after!

Thanks for your help

Coordinator
Aug 19, 2011 at 5:21 PM

Try using this in your placement.info:

Alternate=Parts.Common.Body__OliverContent

Coordinator
Aug 19, 2011 at 5:22 PM

Or maybe Alternate=Parts_Common_Body__OliverContent

Aug 23, 2011 at 1:42 PM

Arrr yes of course, I forgot about the convention used here.  I was looking at the template names in the Shape Tracing tool!

Thanks a lot for your help.