Skip to main content

Posts

Showing posts with the label Tridion 2011GA

REL Standard Tag Library

The RSTL is a library of REL tags providing standard functionality such as iterating collections, conditionals, imports, assignments, XML XSLT transformations, formatting dates, etc. RSTL distributable is available on my Google Code page under  REL Standard Tag Library . Always use the latest JAR . This post describes each RSTL tag in the library explaining its functionality, attributes and providing examples. For understanding the way expressions are evaluated, please read my post about the  Expression Language used by REL Standard Tag Library . <c:choose> / <c:when> / <c:otherwise> Syntax:     <c:choose>         <c:when test="expr1">             Do something         </c:when>         <c:when test="expr2">             Do something else         </c:when...

DynamicContent REL Tag Addition to OData Query Extension

The current post is a follow-up of the previous OData Query Extension I had developed for Tridion 2011 and 2013: Extending OData Query Functionality URL Syntax for OData Query Extension Function Support for Queries in OData Extension The code for this version is available in my GitHub project , distributable JAR ( odata-query-extension-1.3.jar ). DynamicContent REL Tag This tag queries for dynamic Component Presentations using the CD API Query and Criterias. It accepts the following attributes: <tridion:dynamiContent  var=" name "  filter=" expr "  orderby=" expr "  top=" int "  skip=" int "      componentTemplate=" tcmuri " /> , where: var - name of the TransformContext variable that would hold the result. If var is specified, the resulting array of ComponentPresentation objects is stored into the TransformContext ; otherwise, the DCPs are output one after the oter; filter - expression specifying...

Writing My Own Custom REL Tag

This walkthrough describes an implementation of an SDL Tridion custom REL tag. The tag has been written in SDLTridion 2013, but it is also applicable to Tridion 2011. Tridion comes with a number of default REL tags, but you can also add your own custom tags. A REL tag can appear inside a Page or Component Presentation content, and it has to be published to the Content Delivery Database. These tags are executed on the Content Delivery side (presentation server) in one of the following situations: using the ComponentPresentationAssembler : when retrieving the content of a DCP; using the PageContentAssembler : when retrieving the content of a Page; using Content Delivery Web Service ( OData ) , when retrieving either a Page or a DCP; Prerequisites In my approach, I chose to use the Content Delivery Web Service (OData) approach. This means I had to install and configure an OData service. You can do so by following the installation guide from  SDL Live Content . I also ...

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

Create and Publish Page for Component in Workflow using Core Service

It seems like this use case keeps coming back time and time again. The requirement: when a new Component is in workflow, part of the approval workflow on the Component should be an automatic Page generation (where the Component is placed on the Page) and possibly publishing of the Page for the purpose of previewing the new Component in a Page context. All this while Component is in workflow, so approver can actually see how the Component looks like before approving/rejecting it. The only issue, as described in the previous post, is that it is not possible to add a v0.x Component to a Page, when the Page is in a child Publication. The solution is to do all this programmatically. In the following example, I use the Core Service to create a new Page (with values taken from a Folder metadata, for example) and place the v0.x Component on it. using ( CoreServiceSession coreService = new CoreServiceSession ()) {      if (component.Version < 1)   ...