Custom DisplayType

Topics: Writing modules, Writing themes
Mar 3, 2013 at 5:33 PM
Edited Mar 3, 2013 at 5:34 PM
Can i use custom display type?

In cshtml:
var shape = _contentManager.BuildDisplay(item, "CustomDisplayType");
In placement.info:
    <Match DisplayType="CustomDisplayType">
        <Place Parts_Title_Summary="Content:1" />
    </Match>
It does not work.
Developer
Mar 3, 2013 at 6:53 PM
You certainly can. Is it not working?
Developer
Mar 3, 2013 at 6:56 PM
Sorry, overlooked your last sentence.
Perhaps the Parts_Title_Summary shape is not rendered when the display type is not "Summary".
Try it by changing your placement.info to:
<Match DisplayType="CustomDisplayType">
        <Place Parts_Title="Content:1" />
    </Match>
And/or check the source code of the TitlePartDriver to see under what conditions what shapes are created.
Mar 4, 2013 at 12:30 AM
Need to be created Content.CustomDisplayType.cshtml