Matthew Alexandros
07/09/2024, 11:04 PMModel.Value("propertyName") in the Layout page so I can just add these properties once and not have to do it in each template?D_Inventor
07/10/2024, 4:11 AMIPublishedContent, you can start your layout with this line:
@inherits UmbracoViewPage
That will allow you to do exactly what you want.
If you don't always use a model that implements IPublishedContent, you can also take @Umbraco.AssignedContentItem or @UmbracoContext.PublishedRequest.PublishedContent to find the current page. As long as you inject the umbraco helper or umbraco context with the @inject keywordMatthew Alexandros
07/10/2024, 5:13 AM@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
All the child templates are normal Umb13 templates so they do use IPUblsihedContent I just don't know how to access the properties sionce there is no Model in the layout templateMatthew Alexandros
07/10/2024, 5:20 AM@using Umbraco.Cms.Core.Models to the layout page and that gave me access. Thankskdx-perbol
07/10/2024, 7:18 AM