# Create the layout file

To create layout files, perform the following:

1. In Visual Studio, open your *SitefinityWebApp* project » *ResourcePackages* » *\[YourPackage]*.\
   For more information, see [Overview: Resource packages](https://www.progress.com/documentation/sitefinity-cms/overview-resource-packages-mvc).

   > info **NOTE**: You can also create the layout file in the root folder of your project: `~/MVC/Views/Layouts`. For more information, see [Priorities for resolving views](https://www.progress.com/documentation/sitefinity-cms/priorities-for-resolving-views-mvc).
2. Create new folder and name it **Layouts**  .
3. In the context menu folder *Layouts*, and click *Add* » *Code File*.
4. Name the file in the same way that you named your page template.\
   For example, if the page template is named *mypagetemplate*, you must name the layout file *mypagetemplate.cshtml*

   > info **NOTE**: The file extension of the layout file depends on the type of view engine you are using. For example, when using Razor view engine, you need to have a *.cshtml* layout file extension.

   > info **NOTE**: Replace all special characters in the file name with an underscore `_`.
5. Open the layout file you created and paste the following markup:

   ```Razor
   @using Telerik.Sitefinity.Frontend.Mvc.Helpers
   <!DOCTYPE html>
   <html>
   <head>
       <title></title>
   </head>
   <body>
       <h1>Template based on Layout file by convention</h1>
       <div>
           @Html.SfPlaceHolder("Contentplaceholder1")
           @Html.SfPlaceHolder("Contentplaceholder2")
           @Html.SfPlaceHolder("Contentplaceholder3")
       </div>
   </body>
   </html>
   ```
6. In the markup above, you specify the following layout file content:
   * `using` directive for `Telerik.Sitefinity.frontend/Mvc/Helpers` namespace
   * Document type tag `<!DOCTYPE html>`
   * `<head>` tag
   * `<body>` tag
   * Placeholders inside the `<body>` tag that you create by using a helper method `@Html.SfPlaceHolder()` that result in drop zones in the corresponding template in the Sitefinity CMS user interface\
     The helper method accepts the name of the placeholder as an optional parameter.
7. Save the file.

> success **RESULT**: After Sitefinity CMS restarts, it automatically creates a new page template with a name corresponding to the layout file you created. You can work with the page template straight away by navigating to Design » Page templates.
