Skip to main content

Posts

Showing posts with the label CWA

CWA Navigation Custom Tag

Normally with Tridion, we do navigation as a transformation between a navigation XML with an XSLT stylesheet. We plug some parameters into this transformation in order to highlight the current context. In CWA (Content Web Application) terms, this approach still applies only with some modification. Namely, the XML and XSLT are usually both published to the CD (Content Delivery) database. This setup implies that we need a special way or reading the XML/XSLT, prior to performing the actual transformation. To this respect, I created a custom Java tag CwaTransformXml that first ensures the XML and XSLT files are extracted from the CD DB and serialized as files on the file system, then second, it performs the XSLT transformation. CwaTransformXml has the following attributes: xml - the XML file path; xslt - the XSLT file path; paramName - the name of the parameter to pass into the transformation; paramValue - the value of the parameter; out - the variable name to set in PageContex...