Documentation Center

Setting up Context Engine Cartridge Custom Tags or Server Controls in the deprecated in-process API-based Web site

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. You need to configure these custom elements only if you still use the deprecated in-process API on your Web site, rather than the new RESTful API. Regardless of which API you use, you always need to configure these elements in Content Deployer. This topic explains how to enable these custom elements for JSP as Custom Tags, or for ASP.NET as Server Controls, on your Web site.

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 Web installation media, navigate to Content Delivery\roles\context\extension-deployer\lib\.
  3. Copy context-transformer.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" />
    <TagBundle Resource="com/sdl/context/transformer/contextTagTransformerBundle.xml" />
  7. Save and close cd_dynamic_conf.xml.
  8. If your Web site is a .NET Web site, on your SDL Web installation media, navigate to Content Delivery\roles\context\extension-web\dotNet\.
  9. Copy the following files from the installation media to the bin\ subfolder of the Web application on your server:
    • Sdl.Web.Context.Interop.dll
    • Sdl.Web.Context.ServerControls.dll
  10. From the installation media folder Content Delivery\roles\context\api\in-process\dotnet\bin\, copy Sdl.Web.Context.Interop.dll to the bin\ subfolder of the Web application on your server.
  11. 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" />
  12. Save and close web.config.
  13. Restart your Web application.
  14. Perform the same steps for all other Web applications that contain Context Engine Cartridge.