Browse Source

Move layout information to _ViewStart file in Razor templates so scaffolded views use common layout.

pull/28/head
Matt Ward 13 years ago
parent
commit
a680540446
  1. 10
      data/templates/project/CSharp/MvcRazorProject.xpt
  2. 10
      data/templates/project/VB/MvcRazorProject.xpt

10
data/templates/project/CSharp/MvcRazorProject.xpt

@ -235,12 +235,17 @@ namespace ${StandardNamespace} @@ -235,12 +235,17 @@ namespace ${StandardNamespace}
}
}
}
]]>
</File>
<File name="Views\_ViewStart.cshtml">
<![CDATA[@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
]]>
</File>
<File name="Views\Home\Contact.cshtml">
<![CDATA[@{
ViewBag.Title = "Contact";
Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
<h2>Contact Us</h2>
@ -255,7 +260,6 @@ Aliquam suscipit tellus vel nunc elementum fringilla.</p> @@ -255,7 +260,6 @@ Aliquam suscipit tellus vel nunc elementum fringilla.</p>
<File name="Views\Home\Index.cshtml">
<![CDATA[@{
ViewBag.Title = "Home";
Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
<h2>Home</h2>
@ -267,7 +271,7 @@ felis elit, ac scelerisque odio. Morbi ante mauris, sollicitudin eu posuere quis @@ -267,7 +271,7 @@ felis elit, ac scelerisque odio. Morbi ante mauris, sollicitudin eu posuere quis
Aliquam suscipit tellus vel nunc elementum fringilla.</p>
]]>
</File>
<File name="Views\Shared\_LayoutPage.cshtml">
<File name="Views\Shared\_Layout.cshtml">
<![CDATA[<!DOCTYPE html>
<html>
<head>

10
data/templates/project/VB/MvcRazorProject.xpt

@ -227,12 +227,17 @@ Public Class MvcApplication @@ -227,12 +227,17 @@ Public Class MvcApplication
RegisterRoutes(RouteTable.Routes)
End Sub
End Class
]]>
</File>
<File name="Views\_ViewStart.vbhtml">
<![CDATA[@Code
Layout = "~/Views/Shared/_Layout.vbhtml"
End Code
]]>
</File>
<File name="Views\Home\Contact.vbhtml">
<![CDATA[@Code
ViewData("Title") = "Contact"
Layout = "~/Views/Shared/_LayoutPage.vbhtml"
End Code
<h2>Contact Us</h2>
@ -247,7 +252,6 @@ Aliquam suscipit tellus vel nunc elementum fringilla.</p> @@ -247,7 +252,6 @@ Aliquam suscipit tellus vel nunc elementum fringilla.</p>
<File name="Views\Home\Index.vbhtml">
<![CDATA[@Code
ViewData("Title") = "Home"
Layout = "~/Views/Shared/_LayoutPage.vbhtml"
End Code
<h2>Home</h2>
@ -259,7 +263,7 @@ felis elit, ac scelerisque odio. Morbi ante mauris, sollicitudin eu posuere quis @@ -259,7 +263,7 @@ felis elit, ac scelerisque odio. Morbi ante mauris, sollicitudin eu posuere quis
Aliquam suscipit tellus vel nunc elementum fringilla.</p>
]]>
</File>
<File name="Views\Shared\_LayoutPage.vbhtml">
<File name="Views\Shared\_Layout.vbhtml">
<![CDATA[<!DOCTYPE html>
<html>
<head>

Loading…
Cancel
Save