IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
A layout file resides in your Sitefinity CMS project and has links to all CSS and JavaScript files needed on the pages based on templates linked to this layout file. You can add as much placeholders in your layout file as you want, sometimes even a single one works since you may want to create a diverse set of page templates, based on it. When you base page templates on a layout file, in Sitefinity CMS backend, you add all relevant structural sections to the template itself. These include header, navigation, main, footer, and so on. Of course, you can do that in the layout file itself but that may later pose problems if you want to modify the layout file since you cannot move the elements or rename them.
A page template and a layout file are associated to each other via the naming convention. If you rename the layout file, the relationship with the page template breaks and a new page template is generated. Similarly, if you delete a layout file, the page template continues to exist and function, you can configure and edit the grid and content widgets on pages, based on this template but you cannot edit the layout file itself. This means you cannot edit the placeholders, markup, and links. To do so, you need to map the page template to a layout file. In addition, if this layout file had hardcoded links, or you need to add an extra class or meta tag, you cannot do that until you create a new layout file and map the page template to it in accordance with the naming conventions. For more information, see Naming conventions.
On the other hand, if you delete the page template, associated to a layout file, you can later create a new template and map it to the layout file, so that you can work with it and use it in the file system.
IMPORTANT: Mapping by naming convention does not apply for hybrid and Web Forms templates. In case you are working with Web Forms or hybrid templates, you can upload a .master file and create a custom template based on it.
The following sections describe in detail these scenarios, which are not common use cases:
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important