You can use MVC layout files in Sitefinity CMS page templates. To take advantage of this you have to create a file with specific structure in a specific folder.
To create layout files, perform the following:
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.
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 of the layout file mypagetemplate.cshtml
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.
NOTE: Replace all special characters in the file name with an underscore “_”.
Open the layout file you created and paste the following markup:
Back To Top