Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I want some guidance or quick help to convert my VBScript component templates and TBB into modular templates. Below is my current setup.

Page template - Source code i.e. Template Type is (VBScript [Legacy]). The file extension is .jsp. Component Template - Soruce code i.e. Template Type is (VBScript [Legacy]). Output format is HTML Fragment and Component

Presentations based on this Component Template will be "Publish Embedded on a Page". TBB - Source code i.e. Template Type is (VBScript [Legacy])

I want to convert my VBScript code to modular/compound templating.

So I want to know what will be required to convert my current setup. Please make a note that my files are .JSP physical pages which get published on a server.

Some high level questions i have are : If i use DWT or C# Code fragment or .NET assembly as template type, then will the page template work fine with file extension as .JSP?

Is there any VBScript equivalent functions list of DWT or C#?

Is there any quick reference guide to convert the VBScript code starting from page template to TBB?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

I will assume you are using Tridion 2013.

Then you have 3 choices of Template Mediators in your architecture:

  • DWT
  • Razor Mediaor
  • XSLT

I prefer the Razor Mediator myself, since it has the best balance of features and ease of use. I have written a VBScript -> Razor wiki here

The Razor Mediator also has great documentation and is used very often as a healthy alternative to DWT.

You can still use C# TBBs and also need to use Compound Templates with the Razor mediator, but it maps much more easy to VBScript.

If instead you need to use DWT, then prepare to move all your logic (except very simple writeout variable statements) into C# TBBs, create package variables and then display them in the DWT template. SDL has a nice Modular Templating course for these purposes. Beware, the concept and code is substantially different, and instead of migrating or porting the code, you would need to re-think and re-write it. And, along the way you might get lost in the DWT syntax of 'HTML code-as-comments', and face the challenge with syntax for multi-value embedded fields with embedded fields. Remember, DWT arrived with Tridion 2009, and still some of the best helper libraries or approaches date form that period. They're mostly compatible with 2013, so if you decide to head that direction, embrace the past!

As for XSLT, some people swear by it, but it does remain a technology that not too many people are very comfortable with, so this is probably not a good choice except for a few organizations.

In summary, the Razor Mediator wold be your best bet for migrating old VBScript templates to the new and supported Mediator. However, the world is moving towards a more dynamic model, using such frameworks as DD4T. But, that is a different world and a different question.

share|improve this answer
I have not yet read your full reply but read first line and thought to inform that I am using Tridion 2011 SP1 HR2. –  Varun Doharey Jul 30 '14 at 12:37
OK, then the only diff is that the XSLT mediator is not OOTB in 20111. All other points are relevant. –  robrtc Jul 30 '14 at 12:43
Thanks Robrtc.. I will go through the reply minutely and will plan. –  Varun Doharey Jul 30 '14 at 14:10
Moving to modular templating includes re-writing and re-thinking, but also a good opportunity to re-factor and consolidate. +1 to Robert's answer, I would just add that when changing, look for common markup and functionality between templates like adding references, tags, resolving items, transforming characters, or adding SiteEdit markup. Once "converted" you don't have to rewrite or copy & paste that logic, it's now available as a TBB, the template's analog to a Component Presentation. –  Alvin Reyes Jul 31 '14 at 0:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.