I'm trying to set the BuildDisplayContext DisplayType, based on the URL so that I can show a different layout depending on whether I'm on Product detail page, or Product reviews page.
I thought I'd be able to achieve this by calling OnGetDisplayShape and updating the DisplayType, but I see that BuildDisplayContext.DisplayType has a private set method. Can anyone show me how I can set the DisplayType?
Here's the code it tried to use:
OnGetDisplayShape<ProductPart>((context, part) =>
// If Url ends in 'Reviews' then set DisplayType as Review
context.DisplayType = "Review";
and a simplified version of my Placement.info:
<Place Parts_Reviews="-" />
<Place Parts_Reviews="Content:1" />