Configuring storage of comments and ratings by the Content Delivery Web services

Configure in cd_storage_conf.xml where comments, ratings user data and item statistics are stored.

Procedure

  1. Access the WEB-INF/classes/ subdirectory (JSP) or bin\config\ subfolder (.NET) of the location where one of your Content Delivery Web services is running and open cd_storage_conf.xml in a plain-text or XML editor.
  2. Edit the configuration as follows:
    • In the Storages element, add a new Storage element and configure it to point to the UGC database you created in Creating the UGC database using TDM. The default name suggested there was Tridion_UGC.
    • In the StorageBindings element inside the Storages element, add the following:

      <Bundle src="ugc_dao_bundle.xml" />
    • In the ItemTypes element, add the following new Item elements:

      <Item typeMapping="Comment" cached="false" storageId="STORAGE_ID" />
      <Item typeMapping="Rating" cached="false" storageId="STORAGE_ID" />
      <Item typeMapping="UGCUser" cached="false" storageId="STORAGE_ID" />
      <Item typeMapping="UGCItemStats" cached="false" storageId="STORAGE_ID" />

      where STORAGE_ID is the ID of the new Storage element you just created. Caching is initially set to false to keep the Web site as up-to-date as possible. Consult the SDL Tridion core documentation to learn about turning caching on and configuring caching time.

  3. Save and close cd_storage_conf.xml.
  4. Copy the cd_storage_conf.xml file you just saved, and paste it in the WEB-INF/classes/ subdirectory (JSP) or bin\config\ subfolder (.NET) of your other Content Delivery Web service, overwriting the existing cd_storage_conf.xml.