Setting up Context Engine Cartridge Custom Tags or Server Controls in the Web site or Web service

Context Engine Cartridge ships with a custom element for rendering content only if a certain context expression evaluates to true, and another custom element for rendering the result of evaluating a context expression. This topic explains how to enable these custom elements for JSP as Custom Tags, or for ASP.NET as Server Controls.

Procedure

  1. Access the bin\lib\ folder (for ASP.NET) or the WEB-INF/lib/ directory (for JSP) in a Web application which contains Context Engine Cartridge.
  2. On your SDL Tridion installation media, navigate to Content Delivery\roles\cwd-extensions\java\lib\.
  3. Copy cwd_taglib.jar from the installation media to the Web application.
  4. If you intend to publish to REL (typically true if your Web application is a Web service), navigate to the location of your Dynamic Content Delivery configuration file:
    • In a .NET Web application, navigate to bin\config\.
    • In a Java Web application, navigate to WEB-INF/classes/.
  5. In this location, open the Dynamic Content Delivery configuration file, cd_dynamic_conf.xml, for editing.
  6. Inside the <TCDLEngine> section, insert the following TagBundle element:
    <TagBundle Resource="com/sdl/context/renderer/contextTagRendererBundle.xml" />
  7. Save and close cd_dynamic_conf.xml.
  8. If your Web site is a .NET Web site, on your SDL Tridion installation media, navigate to Content Delivery\roles\cwd-extensions\dotNet\.
  9. Copy the following files from the installation media to the bin\ subfolder of the Web application on your server:
    • Tridion.Context.Interop.dll
    • Tridion.Context.ServerControls.dll
  10. If your Web site is a .NET Web site, open web.config in the root of your Web application for editing, and in the pages/controls section, add the following to register the server controls:
    <add tagPrefix="context" namespace="Tridion.Context.ServerControls.Web.UI" assembly="Tridion.Context.ServerControls" />
  11. Save and close web.config.
  12. Restart your Web application.
  13. Perform the same steps for all other Web applications that contain Context Engine Cartridge.