You can now implement page-type-specific layout components and optionally have them render attributes for editor-defined content. If such layouts are present for a page that is part of the page hierarchy, the layout components of the ancestor pages are rendered as well, meaning that you can have nested layouts.
The layout components can be defined using the new Scrivito.provideLayoutComponent
API method. They are rendered by Scrivito.CurrentPage
in a top-down manner starting at the homepage, enabling you to include elements like navigations that take account of the type or hierarchy level of the current page. For example, if you have a homepage, a news overview page and news article pages (/news/article*) and have defined layout components for all of these page types, displaying an article page via Scrivito.CurrentPage
would cause the layout component of the homepage (top-level navigation), of the news overview page (article navigation), and of the article page itself to be rendered, plus, finally, the article’s content.