Theme
A Freemarker-based theme that controls the look-and-feel of a Liferay site.
- Customize colors, layouts, and styles.
- Implement brand-specific designs.
Implementation
Section titled “Implementation”Create the Theme
Section titled “Create the Theme”blade create -t theme corporate-themeCustomize Key Files
Section titled “Customize Key Files”$primary: #2e5bff; // Brand blue
body { font-family: "Roboto", sans-serif;}<#assign logo_height = 60 /><header class="corporate-header"> <img src="${site_logo}" height="${logo_height}" /></header>Build and Deploy
Section titled “Build and Deploy”blade gw deployUse Cases
Section titled “Use Cases”- Rebranding: Match corporate design guidelines.
- Accessibility: Implement high-contrast modes.
Pro Tips
Section titled “Pro Tips”-
Themes:
- Override specific components (e.g.,
user_portlet.ftl) for granular control. - Use
$themeDisplayto access user/site data in templates.
- Override specific components (e.g.,
-
Explore:
- Theme Contributors for global CSS/JS.