liferay-freemarker
CommunityConfidently author Liferay FreeMarker templates
AuthorJoaoPedroAmaral
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Liferay FreeMarker templates are powerful but easy to misuse; this guide reduces errors by showing how to access web content fields, use themeDisplay and serviceLocator safely, and apply null-safety and escaping to avoid runtime errors and XSS vulnerabilities.
Core Features & Use Cases
- Web Content Templates: Access structure fields, images, repeaters, and nested fields with safe null-checks.
- Application Display Templates (ADT): Render Asset Publisher and custom lists, parse article XML with saxReaderUtil, and produce contextual links.
- Fragments & Widget Templates: Use themeDisplay, layout and portal URLs, and lightweight macros for reusable presentation logic.
- Best Practices & Anti-Patterns: Recommendations to avoid heavy business logic, database calls, manual caching, and to prefer presentation-only templates with htmlUtil.escape for user data.
Quick Start
Create a FreeMarker template that outputs a web content field with a null-safety check and htmlUtil.escape, and demonstrate accessing themeDisplay and a service via serviceLocator.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: liferay-freemarker Download link: https://github.com/JoaoPedroAmaral/backBarbearia/archive/main.zip#liferay-freemarker Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.