Authoring Content

Liferay provides two primary ways to author content: using reusable content structures or in-line page elements. While both methods empower authors to create and manage content through a visual interface, they serve different purposes and have distinct benefits. In most cases, websites will leverage a combination of these methods, but the nature of your content and the roles of your authors may lead you to favor one approach for specific types of information.

Understanding these methods is crucial before you begin authoring content or designing content structures in Liferay.

Understanding In-line Content

In-line content is authored and edited directly on the page where it appears using Liferay fragments. Fragments are reusable building blocks made up of HTML, CSS, and potentially JavaScript, designed by developers or power users. They allow content creators and site builders to create modular and visually customizable sections for web pages via drag-and-drop interfaces. Fragments are ideal for page layout elements or visually rich, often static or semi-static, page sections like hero banners, styled call-to-action blocks, cards, or section headings.

In-line content is authored and edited directly on the page where it appears using Liferay fragments.

The authoring process for in-line content is inherently tied to page editing. Content authors drag fragments onto a page and use the fragment’s configuration options to add and style content directly within the page preview. Liferay includes a palette of out-of-the-box fragments supporting in-line editing (e.g., Heading, Paragraph, Image, HTML), and developers can create custom fragments with similar capabilities.

Understanding Structured Content

Structured web content separates the content itself from its presentation and the pages it appears on. This content uses a structure to model its data. You can then use templates, fragments, collections, and widgets to display that content in site pages. Additionally, you can leverage headless APIs to retrieve and render the data in an entirely custom UI.

Structured web content separates the content itself from its presentation and the pages it appears on.

The authoring process for structured content occurs in a dedicated administrative UI, decoupled from site pages. Authors navigate to the Content & Data section within a Site or Asset Library, select a content structure, and fill in the predefined fields and metadata (e.g., title, description, tags, categories). This process uses form-based interfaces and rich-text editors and does not require web development skills; the author can focus solely on the content itself.

How structured content appears on a page is flexible and determined separately. Hence, this structured approach ensures content is reusable and highly adaptable.

Choosing the Right Approach: Fragments vs. Web Content

Deciding whether to use fragments for in-line content or web content for structured articles is a strategic choice influencing authoring workflows, content reusability, and management capabilities. Consider these key differences:

Consideration Fragments (In-Line Content) Web Content (Structured Content)
Authoring Process Authored visually on the page using drag-and-drop elements. Authored in a form-based UI, decoupled from pages.
Web Skills Needed Requires some layout or styling understanding. Requires none, focuses on content data entry.
Content Reusability Tied to a single page instance. Reusable across pages, sites, and channels.
Management Features Provides limited built-in management (e.g., no workflow, versioning). Provides robust built-in management (e.g., workflow, versioning, permissions).
Updates Requires manual updates for each content items on each page. Automatically propagates changes to all pages using the content item
Presentation Presentation is tightly coupled to the Fragment. Presentation is separate (templates, mapping), offering flexibility.
Best For Ideal for static page elements or layout. Ideal for reusable, frequently updated, or managed content.

 

Ultimately, deciding which method to use for a piece of content often boils down to its purpose. Is it primarily a visual element for a specific page layout (e.g., header)? Or is it content that requires management features like workflow, versioning, or needs to be reusable across the site? The decision also depends on the roles, skills, and page edit permissions of your content authors. In-line authoring using fragments requires that authors have edit access to site pages and benefits from some understanding of web design. Structured content authoring, however, occurs in a dedicated UI, requires no web development skills, and is therefore often the necessary choice if content managers do not have edit access to pages.

Feature Fit Evaluation Matrix

For reference, consider this decision matrix:

Criteria Fragments Web Content
Is the content static or semi-static (e.g., section header)?  
Will the content be used in more than one location on the site?  
Does the content need to render in more than one style (template)?  
Will the content require frequent updates?  
Does the content require workflow approval?  
Is version history required for the content?  
Should changes to the content reflect everywhere used?  
Will the content render dynamically (e.g., in collections or search results)?  
Is collaboration not required when crafting content?  

 

Keep in mind that even when you favor structured content, implementations will still probably use fragments for simple, page-specific elements like headings or titles that don’t require complex management.

Authoring Process Overview

While the experience differs, both authoring methods provide intuitive interfaces for content creators.

For in-line content, authors work within the page editor. By clicking on content-editable fragments, they can enter text, add images, and apply basic formatting using a WYSIWYG editor. Additional styling and layout adjustments are handled via the fragment's configuration sidebar.

By clicking on content-editable fragments, authors can enter text, add images, and apply basic formatting using a WYSIWYG editor.

The process for structured content is different as it is decoupled from page editing. Authors access a dedicated administrative UI within the site or asset library. First, they select a content structure, and then they fill out the fields defined by that structure. This includes text areas (often with rich-text editors), image/document upload fields, selection lists, dates, etc. Authors can also apply metadata like tags and categories. When finished, they can save a draft or submit for publication, triggering workflow if enabled.

For structured content, authors access a dedicated administrative UI within the site or asset library.

Authoring for Clarity Vision Solutions

Clarity's goals emphasize empowering non-technical content creators, ensuring brand consistency, and improving discoverability while minimizing IT dependency.

These objectives strongly align with leveraging structured content. This provides marketing and business teams with an easy-to-use, form-based authoring interface that doesn't require web development skills. It ensures consistent presentation through templates and provides robust capabilities for SEO and site search, making content easy to find by both external users and site visitors.

However, Clarity also plans to author in-line content using fragments for page-specific design elements (e.g., headings, titles, hero banners). They can apply this method specifically where content is less likely to change frequently or require formal management workflows.

Conclusion

Liferay's support for both structured and in-line content offers significant flexibility, enabling organizations to tailor authoring processes to their needs. By strategically using each method, organizations can empower their authors, streamline content management, ensure brand consistency, and build digital experiences that are both easy to maintain and adaptable to future needs.

Next, you’ll explore available options for reviewing content.

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy