Templates: Rename "Master Template" to "Layout Template" in v18 docs#8025
Templates: Rename "Master Template" to "Layout Template" in v18 docs#8025nul800sebastiaan wants to merge 5 commits into
Conversation
CMS 18 renames the template editor's parent-template button from
"Master template: No master" to "Layout template: No layout" to align
with Razor/MVC terminology. Updates v18 docs accordingly.
- Renames creating-master-template-part-{1,2}.md to
creating-layout-template-part-{1,2}.md, with redirects in .gitbook.yaml
- Renames the four master-*.png assets to layout-*.png (bitmaps still
show the old UI label and need to be re-shot)
- Updates UI labels, headings, and example file names (master.cshtml ->
layout.cshtml) across tutorials and reference articles
- Normalizes lowercase "master view"/"master layout" to "layout view"
in custom-controllers.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
||
| {% hint style="info" %} | ||
| Views will likely specify a master view to use as the common layout for the site HTML. When using a custom view model it's necessary to make sure this doesn't conflict with any implementation in the master layout view. Eg. if your master layout view is inheriting from a specific model `UmbracoViewPage<SpecificModel>` and using a property from SpecificModel that isn't available in your custom model an exception will be thrown. To avoid this you could: | ||
| Views will likely specify a layout view to use as the common layout for the site HTML. When using a custom view model it's necessary to make sure this doesn't conflict with any implementation in the layout view. Eg. if your layout view is inheriting from a specific model `UmbracoViewPage<SpecificModel>` and using a property from SpecificModel that isn't available in your custom model an exception will be thrown. To avoid this you could: |
There was a problem hiding this comment.
[UmbracoDocs.Terms] Use 'for example' instead of 'Eg' for consistency.
|
|
||
| {% hint style="info" %} | ||
| Views will likely specify a master view to use as the common layout for the site HTML. When using a custom view model it's necessary to make sure this doesn't conflict with any implementation in the master layout view. Eg. if your master layout view is inheriting from a specific model `UmbracoViewPage<SpecificModel>` and using a property from SpecificModel that isn't available in your custom model an exception will be thrown. To avoid this you could: | ||
| Views will likely specify a layout view to use as the common layout for the site HTML. When using a custom view model it's necessary to make sure this doesn't conflict with any implementation in the layout view. Eg. if your layout view is inheriting from a specific model `UmbracoViewPage<SpecificModel>` and using a property from SpecificModel that isn't available in your custom model an exception will be thrown. To avoid this you could: |
There was a problem hiding this comment.
[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content.
| * Keep your Master layout view 'generically typed', eg. only have `@inherits UmbracoViewPage`, and use Model.Value syntax to access properties. or | ||
| * Break the dependency on `Umbraco.Cms.Core.Models` in your master layout by having it instead inherit from `Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ISomeInterface>`. This would be where ISomeInterface is implemented by all your models and contains the properties that the master layout view uses. or | ||
| * Ensure your custom models inherit from whichever class is used to strongly type the master layout view. | ||
| * Keep your Layout view 'generically typed', eg. only have `@inherits UmbracoViewPage`, and use Model.Value syntax to access properties. or |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[UmbracoDocs.Spelling] Check the word 'eg' for typos.
| * Keep your Master layout view 'generically typed', eg. only have `@inherits UmbracoViewPage`, and use Model.Value syntax to access properties. or | ||
| * Break the dependency on `Umbraco.Cms.Core.Models` in your master layout by having it instead inherit from `Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ISomeInterface>`. This would be where ISomeInterface is implemented by all your models and contains the properties that the master layout view uses. or | ||
| * Ensure your custom models inherit from whichever class is used to strongly type the master layout view. | ||
| * Keep your Layout view 'generically typed', eg. only have `@inherits UmbracoViewPage`, and use Model.Value syntax to access properties. or |
There was a problem hiding this comment.
[UmbracoDocs.Terms] Use 'for example' instead of 'eg' for consistency.
| You would usually use this composition on both your `Home` and `Textpage` document types. Since both `Home` and `Textpage` will implement the generated `ISeoProperties` interface, you will still be able to use the simpler models builder syntax (e.g. `Model.PageTitle`). | ||
|
|
||
| However, you won't be able to use the nice models builder syntax on any master template, since a master template needs to be bound to a generic `IPublishedContent`. So you'd have to resort to the *ever-so-slightly* clumsier `Model.Value("pageTitle")` syntax to render these properties. It is possible to solve this issue of master templating, by using partial views, to render the SEO specific properties. | ||
| However, you won't be able to use the nice models builder syntax on any layout template, since a layout template needs to be bound to a generic `IPublishedContent`. So you'd have to resort to the *ever-so-slightly* clumsier `Model.Value("pageTitle")` syntax to render these properties. It is possible to solve this issue of layout templating, by using partial views, to render the SEO specific properties. |
There was a problem hiding this comment.
[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content.
| ``` | ||
|
|
||
| It's important to note though, that this master template will only work for content types that use the Seo Properties composition. | ||
| It's important to note though, that this layout template will only work for content types that use the Seo Properties composition. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[UmbracoDocs.Spelling] Check the word 'Seo' for typos.
| 1. Go to **Settings**. | ||
| 2. Expand the **Templates** folder from the **Templating** section. | ||
| 3. Go to **Master** and open the **Simple Content Page** template. | ||
| 3. Go to **Layout** and open the **Simple Content Page** template. |
There was a problem hiding this comment.
[UmbracoDocs.Editorializing] Consider removing 'Simple' as it can be considered opinionated.
- Fix Seo -> SEO spelling in using-interfaces.md - Replace 'eg.' with 'For example,' / drop where redundant - Split long sentences in the custom-controllers hint and the using-interfaces intro paragraph so they pass the SentenceLength rule Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| * Ensure your custom models inherit from whichever class is used to strongly type the master layout view. | ||
| When using a custom view model, make sure it doesn't conflict with any implementation in the layout view. | ||
|
|
||
| For example, if your layout view inherits from `UmbracoViewPage<SpecificModel>` and uses a property from `SpecificModel`, an exception will be thrown when that property isn't available on your custom model. |
There was a problem hiding this comment.
[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). For content inside note or warning blocks, add blank lines around the content.
…lers hint Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace placeholder PNGs with v18 backoffice captures showing the new "Layout template: ..." button label (renamed from "Master template: ..."). Covers the 4 PNGs renamed in this PR plus 7 additional editor screenshots that referenced the old toolbar label or "Master" tree label: - layout-template-v18 (was master-template-v14) - homepage-has-layout-template (was homepage-has-master-template) - layout-after-adding-the-header (was master-after-adding-the-header) - layout-template-complete (was master-template-complete) - inherit-template - empty-homepage-template - homepage-after-cutting-the-header - adding-renderbody - articles-main-template - articles-item-template-v9 - contact-us-template-with-data-fields Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Audit of all v18 docs PNGs found these still showed the OLD "Master template: ..." toolbar label or "Master" tree label that the v18 backoffice rename to "Layout template: ..." invalidated: - create-template (referenced from fundamentals/design/templates) - stylesheet-reference (css-and-images tutorial) - replace-hardcoded-text-with-umbraco-page-field (displaying-properties) - replace-bodytext-with-page-field (displaying-properties) - footer-text (displaying-properties) - umbraco-page-field (displaying-properties) - homepage-allowed-child (templates-and-document-types) All re-shot in the v18 backoffice on the rename PR branch so the button now reads "Layout template: No layout". Three additional stale shots are NOT in this commit and need manual re-shoot — see follow-up notes: - query-builder.png — needs Articles content nodes set up - template-v14.png — needs the v14 Starter Kit installed - articles-item-template-v9.png — already re-shot but originally shows v9 chrome; the v18 version uses current chrome Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Closing in favor of #8180 |
📋 Description
CMS 18 renames the template editor's parent-template button from "Master template: No master" to "Layout template: No layout" to align with Razor/MVC terminology (the parent of a Razor view is a "Layout", not a "Master page" — the old naming was carried over from WebForms).
This PR brings the v18 docs in line with that rename.
What changed
.gitbook.yaml):tutorials/creating-a-basic-website/creating-master-template-part-{1,2}.md→creating-layout-template-part-{1,2}.mdmaster-template-v14.png→layout-template-v18.pnghomepage-has-master-template.png→homepage-has-layout-template.pngmaster-after-adding-the-header.png→layout-after-adding-the-header.pngmaster-template-complete.png→layout-template-complete.pngmaster.cshtml→layout.cshtml,_Master.cshtml→_Layout.cshtml,Layout = "Master"→Layout = "Layout"reference/routing/custom-controllers.md: "master view" / "master layout view" → "layout view"SUMMARY.mdlink entries updated to match renamed files.What was intentionally NOT changed
extending/packages/packages-on-umbraco-cloud.md: GitHub URL containing/master/(git branch name, unrelated)fundamentals/setup/server-setup/load-balancing/*: "Master and Replica" — server-role terminology, not templatestutorials/creating-a-basic-website/conclusion.md: "Umbraco Master Class" — training course namereference/templating/README.md: "WebForms (masterpages)" — historical referenceThe four renamed PNGs above currently still show the OLD UI label. They need to be re-shot in v18 against the new "Layout template: No layout" button before the PR is taken out of draft.
Optionally, these template-editor screenshots also show the toolbar button (filenames stay the same — only bitmap content changes):
inherit-template.pngempty-homepage-template.pnghomepage-after-cutting-the-header.pngadding-renderbody.pngarticles-main-template.pngarticles-item-template-v9.pngcontact-us-template-with-data-fields.png📎 Related Issues (if applicable)
Pairs with the CMS-side rename in umbraco/Umbraco-CMS branch `v18/improvement/rename-master-template-to-layout`.
✅ Contributor Checklist
I've followed the Umbraco Documentation Style Guide and can confirm that:
Product & Version (if relevant)
Umbraco CMS 18
Deadline (if relevant)
Should ship alongside CMS 18.
📚 Helpful Resources