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
- 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.
- On your SDL Tridion installation media, navigate to Content Delivery\roles\cwd-extensions\java\lib\.
- Copy cwd_taglib.jar from the installation media to the Web application.
- 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/.
- In this location, open the Dynamic Content Delivery configuration file, cd_dynamic_conf.xml, for editing.
- Inside the <TCDLEngine> section, insert the following
TagBundle element:
<TagBundle Resource="com/sdl/context/renderer/contextTagRendererBundle.xml" />
- Save and close cd_dynamic_conf.xml.
- If your Web site is a .NET Web site, on your SDL Tridion installation media, navigate to Content Delivery\roles\cwd-extensions\dotNet\.
- 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
- 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" />
- Save and close web.config.
- Restart your Web application.
- Perform the same steps for all other Web applications that contain Context Engine Cartridge.