Custom DisplayType

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

In cshtml:
var shape = _contentManager.BuildDisplay(item, "CustomDisplayType");
    <Match DisplayType="CustomDisplayType">
        <Place Parts_Title_Summary="Content:1" />
It does not work.
Mar 3, 2013 at 5:53 PM
You certainly can. Is it not working?
Mar 3, 2013 at 5: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 to:
<Match DisplayType="CustomDisplayType">
        <Place Parts_Title="Content:1" />
And/or check the source code of the TitlePartDriver to see under what conditions what shapes are created.
Mar 3, 2013 at 11:30 PM
Need to be created Content.CustomDisplayType.cshtml