Skip to content

Theme

A Freemarker-based theme that controls the look-and-feel of a Liferay site.

  • Customize colors, layouts, and styles.
  • Implement brand-specific designs.
Terminal window
blade create -t theme corporate-theme
corporate-theme/src/css/_custom.scss
$primary: #2e5bff; // Brand blue
body {
font-family: "Roboto", sans-serif;
}
corporate-theme/src/main/resources/_unstyled/templates/portal_normal.ftl
<#assign logo_height = 60 />
<header class="corporate-header">
<img src="${site_logo}" height="${logo_height}" />
</header>
Terminal window
blade gw deploy
  • Rebranding: Match corporate design guidelines.
  • Accessibility: Implement high-contrast modes.
  1. Themes:

    • Override specific components (e.g., user_portlet.ftl) for granular control.
    • Use $themeDisplay to access user/site data in templates.
  2. Explore: