AEM offers a Sites preview service lets developers and content authors preview a website’s final experience before it reaches the publish environment and is available publicly.
It facilitates previewing page experiences that would not be otherwise visible from the author environment, like page transitions and other publish side only content.
For more details about the preview environments, please see the document Manage Environments..
Publishing an Experience Fragment to Preview basically follows the same procedure as for a page, though from the Experience Fragments console or editor.
You can publish content to the preview service by using the Managed Publication UI.
In the Sites console, select the page or pages you wish to send to preview and click on the Manage Publication button
In the following wizard, select Preview as the destination
Click Next, and then Publish to confirm.
A dialog will display the URLs for accessing the content in the preview environment.
Alternatively to using the URLs displayed in the wizard to see the preview content, you can also prepend preview-
to the publish URL of your production instance.
https://preview-p<programID>-e>environmentID>.adobeaemcloud.com/<pathtopage>.html
See the document Managing Environments for more information on how retrieve the URLs for your environments.
Content may also be published to preview by using a publish content tree workflow with the agentId
parameter set to preview
or by using the replication API with an AgentFilter
configured for preview.
Unpublishing content from your Preview environment is basically the same process as unpublishing pages from the Publish environment.
The only difference is that you can select the Destination to be Preview.
The preview tier’s OSGi property values are inherited from the publish tier. However the preview tier’s values can be distinct from the publish tier by setting the service
parameter to the value preview
. The following example of an OSGi property determines the URL of an integration endpoint.
[
{
"name":"INTEGRATION_URL",
"type":"string",
"value":"http://s2.integrationvendor.com",
"service": "preview"
}
]
For more information, see this section of the OSGi configuration documentation.
Follow these steps in order to debug the preview tier using the Developer Console: