Skip to main content

Posts

Showing posts with the label Tridion 2009

RenderedItem Metadata and Instruction

Ever wondered what the methods AddMetadata and AddInstruction do in the RenderedItem class? Did you ever noticed they were there? I’m talking about Tridion.ContentManager.Publishing.Rendering.RenderedItem and the methods: public void AddMetadata(XmlElement metadata) public void AddInstruction(InstructionScope scope, XmlElement instruction) They were introduced a while back (IIRC, R5.2) and they are responsible with sending metadata from the Content Manager to the Content Delivery, or more exactly to the Deployer. This is a great idea and it’s unfortunate very few of us know about them. What’s even more unfortunate is that this is your typical Tridion half-implementation. Namely, while there is this nice API to send metadata to the Deployer, there is no API whatsoever to read it once it reaches the Deployer. You are on your own. But, let’s see what they do. AddMetadata(XmlElement metadata) Documentation states: " The metadata parameter can contain any valid XML structure ...

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...