Defining Types of Content and Assets
Defining your content types and asset structures upfront is a critical part of an effective content management strategy. Establishing clear definitions from the outset ensures consistency, streamlines management, and unlocks the potential for efficient content reuse. Liferay DXP provides several distinct tools designed specifically for defining different kinds of digital information. The primary tools you’ll use are web content structures and document types, though Liferay Objects offers a powerful alternative for some use cases. This article explore these tools and related best practices.
Web Content
Web Content is Liferay's core tool for creating structured, reusable content intended primarily for web pages. This includes articles, news items, banners, announcements, FAQs, and more. Its power comes from separating content from its presentation using key components:
- Structures: Define the data fields for a specific type of content (e.g., fields for a "News Article" might include Headline, Author, Publish Date, Body, and Banner Image).
- Templates: Control the visual display of content when rendered on pages using FreeMarker templates.
- Articles: Individual content items created using a structure, containing the actual text, images, and data.
This structured approach promotes consistency, simplifies updates, and enables content reuse across different pages or sites.
Best Practices for Web Content Structures
Web content structures are the foundation for creating consistent and reusable content like articles or news items in Liferay. They define the specific fields authors will use, separating content data from its presentation. To make the most of web content structures, consider these best practices:
- Plan Before Building: Analyze your content requirements thoroughly before creating structures. Understand the purpose, audience, and lifecycle of each content type.
- Use Appropriate Field Types: Use field types that match the data you want to store. Avoid using plain text fields for everything, as specific types enable better validation and functionality.
- Improve Content Organization with Taxonomies: Use vocabularies and categories for lists of information that repeat across content types instead of using fields.
- Keep Structures Focused: Create distinct structures for distinct content types. Avoid monolithic structures with too many unrelated fields, which become hard for authors to use and developers to template.
- Provide Clear Author Guidance: Use descriptive field labels and informative help text to guide content creators, ensuring they understand what information to enter in each field.
- Consider Reusability and Granularity: Break down content into logical fields that might be reused or styled differently. Balance granularity with authoring ease – don't create too many tiny fields if it makes editing cumbersome.
Documents and Media
Documents and Media is the central application for managing binary files in Liferay (e.g., images, videos, PDFs, office documents, audio files). Here are some key features:
- Folder Structure and Organization: Users can organize assets using a familiar folder and subfolder hierarchy, making navigation and management intuitive.
- Document Types: Define document types with custom metadata fields to classify files, store relevant information, and improve findability.
- Versioning: The system automatically tracks changes to files, enabling users to view previous versions, revert to older versions, or compare differences.
- Check-in/Check-out: To prevent conflicting edits, users can check out documents while working on them, locking them from modification by others until checked back in.
- Sharing and Collaboration: Users can share files and folders with other Liferay users or generate secure links for external sharing.
When paired with Liferay’s other content management tools, these features empower efficient management of diverse media assets.
Best Practices for Document Types
Document types enhance the management of binary files within Documents and Media by enabling you to define relevant data fields. This structured information improves classification, searchability, and governance for assets like images, PDFs, and videos. Apply these best practices when defining document types:
- Identify Essential Metadata: Determine what extra information is genuinely needed for finding, managing, or governing files. Avoid adding unnecessary fields that won't be consistently filled out, and mark key fields as required.
- Standardize Fields: Use consistent field names and types for similar metadata across different document types (e.g., always use copyrightInfo instead of variations).
- Use Specific Field Types: Choose appropriate field types (Date, Text, Select List, User, etc.) to ensure data integrity and enable better filtering and search.
- Improve Asset Organization with Taxonomies: Use vocabularies and categories for lists of information that repeat across asset types instead of using fields.
Custom Data Models
Generally, Web Content is the primary tool for creating and managing website content in Liferay. However, Liferay Objects offers a viable alternative for some use cases. Objects is a tool for creating custom data models for forms and applications without coding, but it can also serve to model website content. This is particularly true for structured or data-driven content that requires complex relationships between records or where dedicated APIs for each content type is beneficial.
When considering Objects for content, carefully evaluate its current feature set compared to Web Content structures. Objects may not yet include all features crucial for content management, such as versioning. Also, determine the correct scope for your data (site or instance), as this significantly impacts how you can access and reuse content.
To learn more, consider taking the Mastering Data Modeling with Liferay Objects course.
Other Specialized Content Applications
Besides Web Content and Documents and Media, Liferay also provides additional applications for specific content needs, including Blogs for chronological entries, and Knowledge Base for structured articles. However, Web Content's comprehensive feature set and compatibility with Liferay's latest capabilities make it the recommended choice for most website content. Consequently, this course focuses on Web Content and does not delve into the nuances of other content applications.
Capturing Content Information: Fields vs. Taxonomies
Content management fundamentally deals with two types of information: data and metadata. Simplistically, ‘data’ refers to the content itself—the meaningful information that you want to display to your end users. Information that describes this content—such as author, date, or topic—is ‘metadata’. In Liferay, you can use both data and metadata for search or display them on site pages.
Strategically capturing and organizing this information is key to effective content management. Liferay provides two primary approaches for doing so:
- Fields: Fields are defined directly within web content structures and document types to capture details specific to each content or asset type.
- Vocabularies and Categories: Vocabularies and categories enable consistent classification and organization of Liferay assets and content. Each vocabulary contains one or more categories, and each category can contain multiple layers of sub-categories.
Deciding between these two approaches depends on the scope and reusability of the information you’re storing. Generally, use fields to store information that is truly unique to each type of content or asset. By contrast, you should use vocabularies and categories when the information you’re storing could relate to multiple types of content and assets. That said, there may often be some cross-over.
For example, if you want to store information about manufacturers of sunglasses, then you could use either approach. Though if the manufacturer’s information applies to multiple product lines or needs to categorize various content and asset types (e.g., blogs), defining it as a vocabulary with categories is more effective.
Applying to Clarity’s Requirements
Clarity's critical success factors emphasize empowering content contributors and ensuring high discoverability and findability for their content. As such they plan to use Liferay’s vocabularies and categories to build an effective taxonomy their contributors can use to classify new content and assets. Using predefined taxonomies helps ensure consistent classification and consequently make searching and finding appropriate assets easier and more effective for site users.
Clarity also wants to empower their non-technical teams to be able to directly contribute new content and assets. Liferay’s out-of-the-box features enable them to easily define structures and document types that streamlines content authoring for both technical and non-technical teams.
Conclusion
Selecting the right tool for modeling content helps ensure your content solutions are effective, efficient, and maintainable. Generally, you should use web content structures for your content needs and document types for files. However, you can also leverage Liferay Objects for custom data model needs. Once you’ve defined your content types, you can start producing content.
Next, you'll explore best practices for content authoring.
Capabilities
Product
Education
Contact Us