title: How to layout a page with MVC3 Razor?
body: <p>I've been reading about layouts, sections, views and partial views, but I don't really know how to approach a layout like this example:</p>
  
  <p><img src="https://i.stack.imgur.com/aKepT.jpg" alt="enter image description here"></p>
  
  <ul>
  <li><p>Top bar: would be like the bar that
  Facebook have on top. I would contain
  the authentication information and
  general options and menus.</p></li>
  <li><p>Navigation bar: would contain
  information about where are you, and
  where can you go. Also a "search"
  box.</p></li>
  <li><p>Body: The actual wanted information.</p></li>
  <li><p>Side bar: would contain relevant
  information about what is in the
  body.</p></li>
  <li><p>Footer: copyright, licence and things
  like that.</p></li>
  </ul>
  
  <p><em>Body</em> would be a "View", <em>Sidebar</em> would be a "Section", <em>Footer</em> would be static HTML in the "Layout", but... what would be <em>Top</em> bar and <em>Navigation</em>? </p>
  
  <p><em>Top bar</em> is not related with anything, so I would put it as a "Partial View" in the "Layout", but I cannot do that because it has to be inside the <code>&lt;body&gt;</code> anyway, so when I call <code>@RenderBody()</code>, it should be rendered. Same thing with <em>Navigation</em>, it's somehow related with the body, but I'd like to separate it as an external control that runs on his own and show information depending on the information in the URL.</p>
  
  <p>How should I approach this?</p>
  
  <p><strong>UPDATE, please read:</strong> The question <strong>is not</strong> about CSS and HTML, it's not about how to layout this, but how to use the Razor tools to do it, it's about Razor <code>RenderBody</code> and <code>PartialView</code>. </p>
  
  <p>When I return a result from my controller, I want to return just what is marked in the picture as "body", and "side bar" as a section, I'd like to avoid repeat the top bar code. Is there a way to create a "ChildView", that inherits from "ParentView", and this from "Layout", in a way that when I return "View("ChildView") the screen is built automatically?</p>