Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Theme inheritance for layouts
Hi,
I want to create a base theme for my application and some themes that extend this base theme.
The base theme will have some custom layouts. Some of the other themes may override this but most will use the same custom layouts.
Can a theme inherit custom layouts, or do they have to be copied over to different themes/themename/layouts directories (and maintained separately) ?
Thanks
Hi,
Layout templates aren't inherited unfortunately. You could try using a StreamResource for those CustomLayouts which need a different layout depending on the theme. Use Application/Window.getTheme() to check what theme is in use, and load the corresponding file as a stream to the CustomLayout.