Documentation Center

Quick Guide to installing Experience Manager (Session Preview)

Experience Manager is a Web-based user interface to the Content Manager that provides in-context editing: end users preview, edit and create Web site content in a 'Staging Web site'. To store user's modifications and display content updated by other users (session data), you need to set up Session Preview. Session Preview ensures that users can view updates to content without having to continually check-in and republish the content. The Quick Guide is intended to instruct you on how to get Session Preview for Experience Manager up and running.

Before you begin

You have a fully-functioning SDL Tridion Content Manager and Content Delivery system depicted in the diagram below as described in the Quick Guide to installing SDL Tridion.

About this task

The following diagram shows what you will do to get Experience Manager (Session Preview) up and running in your existing SDL Tridion installation:

Installing Experience Manager (Session Preview) involves doing the following:

  1. Create Experience Manager database—to store content within an editing session.
  2. Add Experience Manager Web site extension to your staging Web site ("Visitors Web Site")—to show the latest content, specific user who is logged in, and as checked in by other users, and storing user's modifications in Content Data Store for Session Preview
  3. Install Experience Manager Web service—the Web service receives updates from the Content Manager server and uses the Storage Layer to store the user-specific rendered content in a Content Data Store. Only the user who is making updates sees this content while editing; other visitors of the staging Web site see the latest content that is checked in on the Content Manager side.
  4. Add Enable inline editing for Page to Page Templates and Enable inline editing for content to Component Templates used to Publish content to your Staging Web site.
  5. Configure the Publication Target that publishes content to your staging Web site (where users edit content using Experience Manager).

Step 1: Creating the Experience Manager database

The Experience Manager database is a separate Content Data Store instance configured for Experience Manager. You create the Experience Manager database by running a PowerShell script.

Procedure

  1. In the Windows Start menu, enter powershell and open the Windows PowerShell program.
  2. In the command line, navigate to the SDL Tridion installation files Database\MSSQL folder.
  3. Run the script Install Content Data Store.ps1 to create the Content Data Store.
  4. Enter the name of the database server where your database is located, or press enter if your database is on your local machine.
  5. Enter the administrator account user name of the database (the default is sa).
  6. Enter the administrator account user password of the database, for example tridion, and press Enter.
  7. Enter a database name, for example Tridion_Broker_EM, and press Enter.
  8. Press Enter to start the creation process.

Results

Make sure to write down somewhere the database details you enter when you create a database—you will need these details when you configure the staging Web site and Experience Manager Web service.
database=localhost
user=sa
password=tridion

Experience Manager Content Data store
-------------------------
Name=Tridion_BrokerEM
Username=TridionBrokerUser
Password=tridion

Step 2. Installing Experience Manager Web Site extension

In the visitors Web site you created in the first getting started guide, you need to add an extension so that the Web site shows the latest content and a user's modifications are available (stored in Content Data Store for Session Preview).

Procedure

  1. Access the installation files.
  2. Navigate to the Content Delivery\roles\preview\web\dotNet\webapp\ folder.
  3. Depending on the bit size of your target system, unzip x86_64.zip file (on a 64-bit system) or x86.zip (on a 32-bit system) and copy the files into the visitorsweb folder you created in the Quick Guide to installing SDL Tridion (the Web site folder where you published content to).
  4. Navigate to the Content Delivery\roles\preview\web\configuration\samples\ folder and copy the following configuration files into the config\ folder:
    • cd_ambient_conf_sample.xml
    • cd_dynamic_conf_sample.xml
  5. Rename the files:
    • cd_ambient_conf.xml
    • cd_dynamic_conf.xml
    visitorsweb\bin\config now contains the following configuration files:
    • cd_storage_conf.xml
    • logback.xml
    • cd_licenses.xml
    • cd_ambient_conf.xml
    • cd_dynamic_conf.xml
  6. Configure cd_dynamic_conf.xml:
    1. Open cd_dynamic_conf.xml in a plain-text or XML editor.
    2. Insert the following structure as the first child element inside the root element and change:
      • the Port to the port number of your visitors Web site
      • the Id to the Publication ID your visitors Web site
      <URLMappings> 
      	<StaticMappings>
      		<Publications> 
      			<Publication Id="2"> <Host Domain="localhost" Port="82" Protocol="http" Path="" /> </Publication>
      		</Publications> 
      	</StaticMappings> 
      	<StorageMapping IdentifyPublicationByProperty="publicationUrl" /> 
      </URLMappings>
    3. Save and close cd_dynamic_conf.xml.
  7. Open cd_ambient_conf.xml for editing.
  8. Find the <Security> section and enclose it in comments. This element is only needed if you intend to set up OAuth authentication.
  9. Ensure the presence of the following lines inside the <Cartridges> section:
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
    <Cartridge File="footprint_cartridge_conf.xml"/>
  10. Save and close cd_ambient_conf.xml.
  11. Configure where you store content:
    1. Open cd_storage_conf.xml in a plain-text or XML editor.
    2. In the <StorageBindings> section, add <Bundle src="preview_dao_bundle.xml"/>.
    3. In the <Storages> section, in the <Wrappers> element, specify the database details of the Content Data Store for Session Preview (the example shows the complete <Storages> configuration):
       <Storages>
      	<StorageBindings>
      		<Bundle src="preview_dao_bundle.xml"/>
      	</StorageBindings>
      
      	<Wrappers>
      		<Wrapper Name="SessionWrapper">
      			<Storage Type="persistence" Id="sessionDb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
      				<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
      				<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
      					<Property Name="serverName" Value="localhost" />
      					<Property Name="portNumber" Value="1433" />
      					<Property Name="databaseName" Value="Tridion_Broker_EM"/>
      					<Property Name="user" Value="TridionBrokerUser"/>
      					<Property Name="password" Value="tridion"/>
      				</DataSource>
      			</Storage>
      		</Wrapper>
      	</Wrappers>
      
      	<Storage Type="persistence" Id="defaultdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
      		<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
      		<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
      			<Property Name="serverName" Value="localhost" />
      			<Property Name="portNumber" Value="1433" />
      			<Property Name="databaseName" Value="Tridon_Broker22" />
      			<Property Name="user" Value="TridionBrokerUser" />
      			<Property Name="password" Value="tridion" />
      		</DataSource>
      	</Storage> 
      
      	<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
      		<Root Path="c:\visitorsweb" />
      	</Storage>
      	<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
      		<Root Path="c:\visitorsweb\data" />
      	</Storage>
      </Storages>
    4. Save and close cd_storage_conf.xml.
  12. Restart IIS.

Step 3. Installing Experience Manager Web Service

The Experience Manager Web service receives updates from the Content Manager server and uses the Storage Layer to store the user-specific rendered content in a Content Data Store (the Experience Manager database).

Procedure

  1. Create a folder on your filesystem called ExperienceManagerWebService.
  2. Access the installation files.
  3. Go to the Content Delivery\roles\preview\webservice\dotNet\webapp\ folder.
  4. Copy and unzip cd_preview_webservice.zip into the ExperienceManagerWebService folder.
    The ZIP file contains a bin\ folder and a bin\lib\ containing respectively the required DLLs and JAR files.
  5. Copy your sqljdbc4.jar into the \lib folder.
  6. In the ExperienceManagerWebService\bin folder, create a \config subfolder.
  7. Go to your visitorsweb\bin\config folder and copy the following configuration files into the ExperienceManagerWebService\bin\config folder:
    • cd_storage_conf.xml
    • logback.xml
    • cd_license.xml
    • cd_ambient_conf.xml
    • cd_dynamic_conf.xml
  8. Open cd_ambient_conf.xml in a plain-text or XML editor.
    1. Comment out the following cartridge:
      <Cartridges>
      	<Cartridge File="cd_webservice_preview_cartridge.xml"/>
      	<!--Cartridge File="footprint_cartridge_conf.xml"/-->
      </Cartridges>
    2. Save and close cd_ambient_conf.xml
  9. Open IIS and create a new Web site:
    • Provide a site name, for example ExperienceManagerWebService.
    • Specify the path to the ExperienceManagerWebService folder you created.
    • Specify the different port, for example 83.
    • Click OK.

Step 4. Enabling inline editing (Templates)

You need to add Enable inline editing for Page to the Page Templates used to Publish content to your Staging Web site.

Procedure

  1. Open Content Manager Explorer.
  2. Go to your visitorsweb Publication.
  3. Navigate to the Building Blocks > Default Templates Folder:
    1. Select the Default Page Template and create a copy called EM Page Template.
    2. Select the Default Component Template and create a copy called EM Component Template.
  4. Create some dummy content:
    1. Create a Schema called SimpleSchema with a single, multi-valued text field.
    2. Create a Component called EMTest based on the Schema.
    3. Open the EM Component Template. In the Linked Schemas tab, select SimpleSchema and click Add to move it to the Linked Schemas.
  5. Start Template Builder.
  6. Open EM PageTemplate in Template Builder.
    1. In the Building Blocks view, find the Template Building Block called Enable inline editing for Page and drag it directly under the Dreamweaver Template Building Block of the Template.
    2. Select Enable inline editing for Page and select SiteEdit Editor URL in the list of properties on the right.
    3. Set the value of SiteEdit Editor URL to http://localhost/WebUI/Editors/SiteEdit/, where localhost is the host name of the Content Manager Explorer Web site with the Experience Manager installed.
    4. Save and close the Page Template.
  7. Open EMComponentTemplate in Template Builder.
    1. In the Building Blocks view, find the Template Building Block called Enable inline editing for content and drag it directly under the Dreamweaver Template Building Block of the Template.
    2. Save and close the Component Template.
  8. In Content Manager Explorer, open the HelloWorld Page you created in the Quick Guide to installing SDL Tridion:
    1. Set the Page Template to EMPageTemplate.
    2. In the Component Presentations tab, add the EMTest to the Page.
    3. Save and close the Page.

Step 5. Configuring a Publication Target

You need to configure the Publication Target that publishes content to a staging Web site where users can edit content in Experience Manager.

Procedure

  1. Open Content Manager Explorer.
  2. In Publishing Management > Publishing Target open the Publication Target visitorsweb you created in the Quick Guide to installing SDL Tridion.
  3. In the General tab, select Enable for inline editing.
    The Session Preview tab appears.
  4. In the Session Preview tab:
    1. In Content Delivery Endpoint URL, specify http://localhost:83/odata.svc/.
    2. In Website URL's, click Add, enter http://localhost:82/ and click OK.
  5. Click save and close.
  6. Select HelloWorld Page and choose Publishing > Publish.

Step 6. Opening and Testing Experience Manager

Experience Manager is a user interface to the Content Manager that runs in your browser, and that allows end users to preview, edit and create Web site content in the context of a 'Staging Web site'.

Procedure

  1. Open a browser and enter http://localhost:82/HelloWorld.html
  2. Click the SDL Tridion button in the top-left hand corner of the page:
  3. The Experience Manager user interface opens:
  4. Edit the component and change the text from Test out Experience Manager to Test out whether the session preview is working...
  5. Click Update Preview.
    The content of the Page is remains unchanged because the content is being retrieved from the Experience Manager database.
  6. Open a different browser and enter http://localhost:82/HelloWorld.html.
  7. Click the SDL Tridion button in the top-left hand corner of the page.
    Note the component text reads Test out Experience Manager because the content is coming from the Content Data Store.
  8. Click Update Preview.
    The content of the Page is updated to Test out whether the session preview is working... because the session content is being retrieved from the Experience Manager database.

Results

You have installed and configured the Experience Manager user interface and Session Preview (Content Delivery).