Beskrivning
Object Smart Cards is a flexible Liferay fragment designed to display dynamic content from REST APIs as responsive card layouts. It is ideal for listing Liferay Objects, headless content, or any external API data in a clean and modern card interface.
The fragment fetches data from a configurable API endpoint and renders items as customizable cards with support for search, pagination, caching, and field mapping. This allows developers and content managers to quickly create dynamic listings without building custom applications.
Perfect for directories, service listings, news feeds, or any object-based content.
Key Features
Dynamic API Integration
• Fetch content directly from REST APIs or Liferay Headless APIs
• Compatible with Liferay Object APIs (/o/c/...)
• Fully configurable API endpoint
Flexible Field Mapping
• Map API fields to card elements:
• Title
• Description
• Image
• Link template
Search and Pagination
• Built-in client-side search
• Configurable pagination
• Adjustable page size
Smart Caching
• Local caching to reduce API calls
• Configurable cache duration
Responsive Card Layout
• Grid or list layout modes
• Adjustable number of columns
• Smooth hover interactions
• Customizable card shadows and spacing
Customizable Design
• Adjustable colors and styles
• Image size control
• Border radius and spacing settings
• Modern UI using CSS variables
No Backend Development Required
• Works entirely as a fragment
• Easily configurable through Liferay’s fragment configuration panel
Typical Use Cases
• Liferay Object listings
• Service directories
• Location or unit listings
• Content catalogs
• External API integrations
• Dynamic content dashboards
Administrators can configure:
• API URL
• JSON items path
• Title and description fields
• Image field path
• Card link template
• Page size
• Cache duration
• Search visibility
• Pagination visibility
This allows the same fragment to be reused across multiple sources.