Using the Staging Environment

After enabling staging (either Local Live or Remote Live) for a site, you’ll notice additional options provided on the top Control Menu and also in the Menu to the left. If you haven’t enabled staging for your site, see the Enabling Staging section for instructions. These new menus help you manage staged pages. You’ll also notice that most of your page management options have been removed, because now you can’t directly edit live pages. You now must use the staging environment to make changes.

Staging Content

Click on the Staging button to view the staged area. Your management options are restored and you can access some new options related to staging.

Figure 1: You can see the new staging options added to the top and left of your screen.

Figure 1: You can see the new staging options added to the top and left of your screen.

To test out the staging environment, add the Bookmarks application and then click on Live from the top menu. Notice that the Bookmarks app isn’t there. That’s because you’ve staged a change to the page but haven’t published that change yet to the live site. Go back to the staged page and observe the options you have to choose from to help in your staging conquest.

Site Pages Variations: allows you to work in parallel on multiple versions of a staged site page. You’ll learn more about this later.

Page Variations: allows you to work in parallel on multiple versions of a staged page. You’ll learn more about this later.

Undo/Redo: allows you to step back/forward through recent changes to a page, which can save you the time of manually adding or removing apps if you make a mistake.

History: shows you the list of revisions of the page, based on publication dates. You can go to any change in the revision history and see how the pages looked at that point. To access History, select the Options icon (Options) in the Staging bar.

Ready for Publication: After you’re done making changes to the staged page, click this button. The status of the page changes from Draft to Ready for Publication and any changes you’ve made can be published to the Live Site. When you publish a page to live, only the version which was Marked as Ready for Publication is published.

When clicking the Publish to Live button, a popup window appears with come configuration options for your publication. You can give your publication a name and view the changes since last publication. If everything looks good, you can click the Publish to Live button to publish your staged results to the live site.

If you’d like to further configure your publication, you can select the Switch to Advanced Publication button. Opening the Advanced Publication menu would be useful if you’d like to schedule a time to publish your content, edit the pages/content that will be included in the publication, manage permissions, etc. You’re presented a custom publication menu, where you can perform advanced editing to your publication process.

You have two options to choose from for the Date category:

Now: immediately pushes any changes to the Live Site.

Schedule: lets you set a specific date to publish or to set up recurring publishing. You could use this, for example, to publish all changes made during the week every Monday morning without any further intervention.

Subsequently, you can choose additional options:

Figure 2: Youre given additional publication options for your pages, content, deletions, and permissions.

Figure 2: You're given additional publication options for your pages, content, deletions, and permissions.

Pages gives you the option to choose which pages to include when you publish. You can choose the page group (Public or Private) to publish by selecting the Change to Public Pages or Change to Private Pages. You cannot publish both at the same time; you’ll have to complete their publication processes separately if you want to publish both page groups. You can also choose specific pages to publish, the look and feel of those pages, etc.

Content lets you configure the content to be published. Selecting the Choose Content option lets you filter the content to be published, based mainly on the date range and content type. If you choose a page to be published from the Pages menu, the portlets and their references are always published, even if you specified differently in the Content section.

There are other filtering sub-options for certain content types. Next, you’ll look at these content filtering options.

You first must choose what content to publish based on date. Specifying a date range lets you choose content to publish based on when it was created or last modified. Select the option that best fits your workflow. The available options are described in more detail below:

All: publishes content regardless of its creation or last modification date.

From Last Publish Date: publishes content that was created or modified since the last publish date. This is the default option.

Date Range: publishes content based on a specified date range. You can set a start and end date/time window. The content created or modified within that window of time is published.

Last: publishes content based on a set amount of time since the current time. For example, you can set the date range to the past 48 hours, starting from the current time.

Under the date options are the different types of content that can be published. This list is populated based on the provided date range. For example, if at least one article has been created or modified in the given date range, a Web Content section appears in the list, and the number of articles is shown next to the Web Content label. Otherwise, the Web Content section is absent.

Categories and Page Ratings content types are not dependent on the date range, and are always shown in the list.

Unchecking the checkbox next to a certain content type excludes it from the current publication to Live.

Some of the content types in the list, like Web Content and Documents and Media, have further filtering options related to them. For instance, when the Web Content section is present and checked, it shows a comma-separated list of related items to be published, including the articles themselves. A sample list of related items for web content might look like this: Web Content(12), Structures(3), Referenced Content, Version History. You can remove items by clicking the Change button next to the list.

Referenced Content is represented by the Documents and Media files included in web content articles. Documents and Media content gets referenced when a user uses the editor to insert an image or if the article is based on a structure that has a field of the Documents and Media type.

Web content tends to be frequently updated, often more so than other kinds of content. Sometimes this can result in high numbers of versions, into the hundreds. This makes it take a long time to publish these articles. Liferay DXP addresses this issue by allowing you to choose whether or not to publish the Version History, or the past versions of the web content articles to be published. If you disable this option, only the last approved version of each web content article is published to Live. This can significantly speed up the publication process.

Figure 3: Click the Change button and uncheck the version history box to only publish the latest approved version of web content articles that have multiple versions.

Figure 3: Click the *Change* button and uncheck the version history box to only publish the latest approved version of web content articles that have multiple versions.

You can set this option globally. If you navigate to the Control Panel → ConfigurationSystem SettingsWeb Content Administration, you can toggle the Publish version history by default checkbox. This sets the default behavior. When publishing content, it is selected by default, so site administrators must manually uncheck the Version History box to publish only the latest approved version of web content articles. To change the default behavior, enable the checkbox in System Settings.

When the Documents and Media section is present (because at least one document has been created or modified in the provided date range), you can disable the transfer to live of the previews and thumbnails associated with the documents to be published. This can also speed up publication time.

Deletions lets you delete portlet metadata before publishing and delete operations performed for content types. If the Replicate Individual Deletions selector is enabled, operations performed for content in the staging environment are replicated to the target site.

Permissions allows you to include permissions for the pages and portlets when the changes are published.

Now that you have an idea of the available staging options, click Mark as Ready for Publication, and then click Publish to LiveNow. Select Publish to publish your Bookmarks application to the live site.

If you create a bookmark in the staged site, it isn’t visible in the live site until you publish it to the live site. If workflow is enabled for any new resource, the resource needs to go through the workflow process before it can be published to the live site.

Figure 4: The staging toolbar indicates whether youre able to publish to the live site.

Figure 4: The staging toolbar indicates whether you're able to publish to the live site.

You can also manage your staging processes. Once staging is enabled, you can navigate back to the Staging option located in the Menu’s Publishing tab. From here you’ll see a list of staging processes that have been completed. You can relaunch or clear any of these publications by clicking the Actions button (Options) next to a process. If you click the Scheduled tab from above, you’ll find staging processes that you’ve scheduled for future publication dates.

If you find yourself repeatedly creating staging processes that are very similar to each other, you should think about using Publish Templates. Up to this point, you’ve looked at how to create custom publication processes.

Instead of manually having to customize a publication process every time you’re looking to publish pages/content, you can use a publish template. Using publish templates provides you the convenience of storing publication process settings so they can be reused. If you publish content frequently and usually select the same options to publish, the task of selecting options repeatedly can become tedious. With publish templates, you can select a custom template and immediately publish with the options you configured.

To create a publish template, select the Options icon (Options) from the top right corner of the Staging screen and select Publish Templates. Click the Add button (Add
Publish Template) and assign the template a name and description, and then fill out the configuration options as you would during a custom publication process. Once you’ve saved your publish template, it is available to use from the Publish Templates tab in the Publish to Live menu. To use the template, click the Actions button (Options) next to the template and select Publish to Live. This automatically fills the fields and options for publishing pages and their content. All you have to do is give the publication process a custom name. Once you confirm the configuration settings, your staging settings are published.

Now that you know how to use the staging environment, you’ll learn about the permissions involved to help manage this environment.

Managing Permissions

With the staging environment, there are many different options to use for building and managing a site and its pages. Sometimes limiting the access to a subset of the powerful features of staging is desired by some administrators. You can manage access to the staging environment by creating or modifying a role to possess certain permissions. To create/modify a role, navigate to the Control PanelUsersRoles. You can create a new role by selecting the Add button (Add) and completing the New Role menu. Once you have a new role created, or you’ve decided on the role you’d like to modify, select the role’s Actions icon (Actions) and select Define Permissions.

The most obvious permissions for staging are the general permissions that look similar to the permissions for most Liferay apps. These permissions can be found in the Site AdministrationPublishingStaging section of the Define Permissions menu. This includes Access in Control Panel, Configuration, Permissions, Preferences, and View. Also, there are some site resource permissions that deal directly with staging. These permissions are located in the Control PanelSitesSites section in the Define Permissions menu. The relevant site resource permissions related to staging are listed below:

  • Add Page Variation: hides/shows the Add button on the Staging bar → Manage Page Variations screen.
  • Add Site Pages Variation: hides/shows the Add button on the Staging bar → Manage Site Page Variations screen.
  • Export/Import Application Info: if the Publish Staging permission is not granted, hides/shows the application level Export/Import menu. The Configuration permission for the Export/Import app is also required
  • Export/Import Pages: if the Publish Staging permission is not granted, hides/shows the Export/Import app in the Site Administration menu.
  • Manage Staging: hides/shows the staging configuration menu in the Staging app in the Site Administration menu.
  • Publish Application Info: hides/shows the application level Staging menu.
  • Publish Staging: hides/shows the Publish to Live button on the Staging bar and hides/shows the Add button in the Staging app in the Site Administration menu.
  • View Staging: if Publish Staging, Manage Pages, Manage Staging, or Update permissions are not granted, hides/shows the Staging app in the Site Administration menu.

Notice that some of the permissions listed above are related to the export/import functionality. Since these permissions are directly affected by the Publish Staging permission, they are important to note. Visit the Importing/Exporting Pages and Content section for more details on importing/exporting site and page content.

One of the most powerful features of staging is page variations. Next, you’ll see how to use them to create multiple different variations of your site’s pages for different purposes.

« Publishing Staged Content EfficientlyUsing Site Pages Variations »
Esse artigo foi útil?
Usuários que acharam isso útil: 0 de 0