The reason for that is that I want to have access to Model.Content to pass this to a partial view to display a banner.
But when I go to a news page for example I get an error message that looks like the following:
The model item passed into the dictionary is of type 'UmbracoEntities.Domain.MasterModel`1[.UmbracoEntities.Domain.Generated.News]', but this dictionary requires a model item of type 'UmbracoEntities.Domain.MasterModel`1[UmbracoEntities.Domain.Generated.ParentDocumentType]'.
Is it possible to work around this error message and be able to use the Model.Content? Or are there maybe other options to be able to pass the content to the Parial View of the banner?
I found a workaround by using also on the "2 kolommen" the IMasterModel.
This still means of course that I'm not able to access Model.Content on this view. But it seems that I didn't need to pass Model.Content to the partial view to display the banner. I just could use the following on the Banner partial view:
But I'm still wondering what I have to do in case that I need some elements of Model.Content on the "2 kolommen" view. My guess is that I need to extend the IMasterModel with this properties like I had to do for the "Layout" view. Or are there still other options?
Multiple levels of views
In Umbraco you can have multiple levels of views like for example following structure
Pages created with templates under the "2 kolommen" template are from different document types but have the same parent document type.
In Layout I'm using
In "2 kolommen" I want to use something like
The reason for that is that I want to have access to Model.Content to pass this to a partial view to display a banner.
But when I go to a news page for example I get an error message that looks like the following:
Is it possible to work around this error message and be able to use the Model.Content? Or are there maybe other options to be able to pass the content to the Parial View of the banner?
I found a workaround by using also on the "2 kolommen" the IMasterModel.
This still means of course that I'm not able to access Model.Content on this view. But it seems that I didn't need to pass Model.Content to the partial view to display the banner. I just could use the following on the Banner partial view:
But I'm still wondering what I have to do in case that I need some elements of Model.Content on the "2 kolommen" view. My guess is that I need to extend the IMasterModel with this properties like I had to do for the "Layout" view. Or are there still other options?
is working on a reply...