MikeB
MikeB

Reputation: 345

MVC 3 and razor, How to build a structure with _layout within _layout?

I'm currently setting up a large project containing 5 different sites. All of these sites have the same "frame" in common (_layout.cshtml in Views/Shared in root).

I've set up a structure where every site is a area and this will work great for our needs. My question is, how can I work with one _Layout.cshtml (a login bar, footer, background) that is the same for all sites and then one _Layout.cshtml for each site that, in turn, is called via a partial view (for example index.cshtml) that, in turn is called via a controller?

Upvotes: 3

Views: 977

Answers (1)

Matt Griffiths
Matt Griffiths

Reputation: 1142

I think what you are looking for are nested layouts in Razor? There is a tutorial that I used here.

Hope this helps, Matt.

Upvotes: 5

Related Questions