I have a content part called coverflow that I wanted to augment the view of on just the home page. I tried the "Url Alternates" module to no avail. Since the part is (in the Parts folder) Coverflow.cshtml, I named my alternate Coverflow-url-homepage.cshtml
per the documentation, but nothing happens.
I can get an alternate to render on that page using placement.info. I renamed my alternate part Coverflow.Homepage.cshtml, and added this:
<Place Parts_Title="-" />
<Place Parts_Coverflow="Content:1;Alternate=Parts_Coverflow_Homepage" />
Orchard now renders my alternate instead of the template provided by the module. The only problem is that I can't use the model anymore. If I copy the exact same template the module usually renders, now I get an error:
The model item passed into the dictionary is of type 'IShapeProxyf5ec0bccdc1a414eabe523e4808d82c5', but this dictionary requires a model item of type 'PlanetTelex.Coverflow.ViewModels.CoverflowViewModel'.
Why does the alternate use a different model? I've attempted exploring this IShapeProxy model, but can't figure out how to access the coverflow model. Per the post at http://orchard.codeplex.com/discussions/233617
I've tried using Model.ContentItem.As<YouPart>().YouPartProperty but that extension method cannot be found, even with the using line included.
I can work around this issue, but using the alternates would be the elegant solution- any ideas on how to make them work with the model of the original part?