Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Before the days of MVC when I was using webforms I would created a few layers of templates so I didn't repeat common HTML.
I thought I could do something similar in the Hybrid Framework.
Currently we have the Master template
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IMasterModel>
and everything inherits from that.
I wanted to create the following structure:
Master-- Home-- Page With Side Navigation-- -- Content Page-- -- Some other page that will have a side nav-- Gallery
so that I can put my subnavigation rendering code on one template and have some of the others inherit it.
I thought I'd be able to use:
@inherits Umbraco.Web.Mvc.UmbracoViewPage<MasterModel<Menu>>
for my Page With Side Navigation template as that would give me access to some the common 'Content' properties I need on the page but I can only get it to work using
otherwise it just complains about the type of model being passed in.
Can I do this in v7? I was able to do it in v6 by using the BaseModel.
Regards, Matt
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Nested templates
Before the days of MVC when I was using webforms I would created a few layers of templates so I didn't repeat common HTML.
I thought I could do something similar in the Hybrid Framework.
Currently we have the Master template
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IMasterModel>
and everything inherits from that.
I wanted to create the following structure:
Master
-- Home
-- Page With Side Navigation
-- -- Content Page
-- -- Some other page that will have a side nav
-- Gallery
so that I can put my subnavigation rendering code on one template and have some of the others inherit it.
I thought I'd be able to use:
@inherits Umbraco.Web.Mvc.UmbracoViewPage<MasterModel<Menu>>
for my Page With Side Navigation template as that would give me access to some the common 'Content' properties I need on the page but I can only get it to work using
@inherits Umbraco.Web.Mvc.UmbracoViewPage<IMasterModel>
otherwise it just complains about the type of model being passed in.
Can I do this in v7? I was able to do it in v6 by using the BaseModel.
Regards, Matt
is working on a reply...