Skip to main content

Posts

Showing posts with the label Mediator

Executing an ITemplate Inside a JAR TBB

In this post I'll talk a bit about the next functionality of my Java Mediator for SDL Tridion templating -- uploading a JAR containing ITemplate classes into the Content Manager and executing a particular template. JAR Template Building Blocks In a very similar fashion to a .net assembly TBB, I implemented the functionality of having a new Template type for storing JARs inside a TBB, in a binary fashion. These TBBs have a special type, binary, that allows uploading a JAR. A JAR TBB contains Java classes, some of them representing implementations of the ITemplate interface. The actual interface is the TOM.Java proxy tridion.contentmanager.templating.assembly.ITemplate . I created a new Template type in configuration file Tridion.ContentManager.config , under node  < configuration > / < templateTypeRegistry > / < templateTypes > : < add id = " 10 " name = " JAR TBB " mimeType = " application/java-archive " hasBinar...

RenderComponentPresentation Tag for Java Mediator

In order to write the first complete Page Template for the Java Mediator for SDL Tridion Templating, I needed a Java tag similar to the @@RenderComponentPresentation@@ from Dreamweaver Templating. The logic to write such a tag is pretty simple. However, I wanted to have a versatile tag that would not only accept a Component and a Component Template, but also the possibility to specify some 'wildcards' or, more exactly, some Regular Expressions to allow the rendering of several Component Presentations based on different criterias. The criterias I implemented are: Component title : in the current Page, matches each Component Presentation Component title on this Regular Expression and if a match is found, the CP is displayed; Component Template title : same as above, but matching is done on the Component Presentation's Component Template title; Schema title : same as above, only matches the Schema title of the Component in the Component Presentation; Additionally,...