Introduction to Site Building

Sites are a fundamental component of Liferay DXP. At it’s core, a Site is a collection of pages that contains content. However, a Site can also contain applications that provide additional functionality for the page—many are available for you to use out-of-the-box. When you first start and configure your Liferay Portal instance, a default Site is included. This Site doesn’t have its own name but rather takes the name of the instance. By default the instance name is Liferay, but this value can be changed through the configuration of the setup wizard or through the Instance Configuration in the Control Panel. See Configuring the Virtual Instance for more information. Liferay DXP includes powerful features that you can harness to streamline the Site creation process and create rich and personalized experiences for your Site’s users.

You can build powerful Sites with Liferay Portal.

Creating Sites

Liferay DXP includes all the tools you need to build your Site and create pages. You can create a Site from an existing Site Template, which includes a predefined set of pages with applications, or you can create a blank Site and build it from the ground up. Pages are just as flexible. Create a page from an existing page type or create one from one of the default page templates, or a page template you’ve created yourself, to save time. Both sites and pages can be organized hierarchically. You can add as many nested pages (child pages) and nested sites (child sites) as you like for the parent Site or page. It is possible to have multiple sites across your Liferay DXP instance for various Organizations, employees, etc. You can share content and pages between sites with the import and export options.

Configuring Pages and Site Navigation behavior is intuitive and flexible. Pages are automatically added to the navigation when they’re created. You can hide pages if you prefer, or simply make them private, so only members of the Site can view them with the proper permissions.

Liferay DXP also provides tools to enable you to make changes to your site without disrupting user experience. Liferay Sites can be staged, allowing changes to be made and tested on a site before being published to users. Liferay DXP’s Publications feature handles this for you. You can use Publications to develop, track, and update your Site in a safe environment, without affecting the live site that your users see.

Displaying Content

Liferay DXP’s Content Management System (CMS) is intuitive and user-friendly, offering a variety of tools that you can use to create and display content of many types. You can use the Web Content Display widget to display web content articles of your choosing. If you want to publish a mix of content (asset) types (blogs, images, web content articles, etc.) you can use the Asset Publisher. You can manually select the content the Asset Publisher displays, or you can have it display assets dynamically based on specific criteria, giving you a great deal of control over the experience your users have. You can also embed content from other websites with the Iframe widget or by creating an Embedded Page.

You can create and edit content inline with Fragments. Fragments are individual pieces of code (CSS, HTML, and JavaScript) that you can arrange and combine to build a page. Several Fragments are included out-of-the-box that you can modify to create your content. If you require a more custom solution, you can create your own.

Each piece of content (asset) has a default page that appears when you view it, but you can provide a customized landing page by creating a Display Page Template. A Display Page Template maps portions of the Web Content (title, main body, image, etc.) to Fragments, so you can create the look you desire.

Display Page Templates let you map Web Content to Page Fragments to display your content with the design and layout you want.

Personalizing User Experiences

Liferay DXP’s Personalization and Segmentation framework lets you build site experiences that respond to and meet your users interests and needs. You can create user Segments based on specific criteria, such as the Organizations they belong to or their Role in the Site, and then use it to display personalized page layouts and content for the user demographic, or you can integrate with Analytics Cloud to analyze the behavior of the users within the Segment to see how they interact with your Site. You can even recommend content based on a user’s behavior.

Customizing and Configuring Sites

There are many settings available to tweak the look, behavior, and functionality for your Site. Sites and their Content can be easily localized to multiple languages as needed.

The look and feel of your site can be changed by using different themes. Themes can be downloaded and deployed from Liferay Marketplace, or you can create a theme yourself. Themes determine the overall look and feel for a Site and define the CSS, JavaScript, and HTML for the page (via FreeMarker templates). FreeMarker combines standard HTML elements and provides the added benefit of variables, conditional statements, looping, and more. See Developing Themes for more information.

Optimizing Sites

Liferay DXP provides multiple tools and features for optimizing your Site, from increasing your Site’s Search Engine Optimization (SEO) ranking, to creating responsive pages optimized for each device, to honing your messaging campaigns with A/B Testing. A/B Testing compares the current default variation of a page with the page variant(s) to see which pages perform better for a given goal (bounce rate, clicks, etc.). This enables you to make better, data-driven decisions about your site, so you can serve users and customers faster than ever before.