Howto publish folders from SDL Tridion
In the Tridion cms content is being stored in folders. The folders are similar to folders in file systems, they contain both subfolders and components. However if you wish to publish the content of an entire folder you will have to traverse all subfolders yourself in order to select and publish the components manually. Not exactly a job for volunteers.
Fortunately there is something called the Tridion API which allows you to write a (power)tool which takes care of traversing a folder hierarchy and republishing all the content in it. This will reduce the effort of republishing an entire folder to an acceptable level and give any script kid a huge sense of accomplishment.
Alas a tool like this is not very friendly to the users of the Tridion cms. They will ask why it is impossible to publish a folder in the same manner they can publish a structure group. The answer to this question is unknown to me at this point in time. Perhaps one of the Tridion employees reading this blog can enlighten me on this subject (and approve my comments on ideas.sdltridion.com).
Unfortunately changing the Tridion content manager explorer is not for the faint hearted. Which made this exercise an ideal initiation rite for any intern lounging about hoping to be accepted as an employee of ‘the firm’. In the zip-file you can find his Odyssey including the patched files for Tridion 5.3 (Dutch). The files come from the \tridion\web\ folder on the CM server. They are not fit for any purpose use at your own peril (create a backup etc) and nobody, except perhaps the person installing these files, will be liable for any damages.
Kudo’s should be addressed to Oskar uit de Bos. If you think this is a useful addition to the Tridion content explorer please vote for the idea posted by Wouter van Vegchel and maybe sdl Tridion will implement it someday.
PS if you use a language other then Dutch you will need to add the following lines to your language file(\Tridion\web\Resource\####\ContextMenu.xml):
<resource id=”18000″ ref=”actFolderPublish”>Publish Folder</resource>
<resource id=”18001″ ref=”actFolderPublish”>UnPublish Folder</resource>
Tridion .NET templating, Yea or Nay
In version R5.3 Tridion has introduced Modular/Compound Templating, which offers (more) separation between layout and business logic. It also allows the implementation of Template Building Blocks (TBBs) with C# and/or .NET assemblies.
A Template Building Block used with Modular/Compound Templating is (normally) responsible for one major task. For example: Converting XML to HTML, Publish all Binaries in the package or Activate Tracking (these are all standard Tridion TBBs).
Below I’ve listed the major ‘Pros and Cons’ of working with Tridion .NET templating.
| Pros | Cons |
|---|---|
| Development You write code in C# (an actual programming language) no need for VBScript anymore. Also having the predefined methods, offered by the .NET framework, at your disposal (instead of writing all yourself) speeds up development a great deal. |
Testing The Tridion classes don’t (easily) allow extending them, thus making it hard to completely UNIT test the code. Only the code not dependant on Tridion objects can be UNIT tested out of the box. |
| Testing It’s possible to (partially) UNIT test the Template Building Blocks, ensures during the development process that these parts (still) perform as expected. This is a major improvement to former versions, where this was really hard to achieve. |
|
| Testing With the Tridion Template Builder, a tool shipped together with Tridion, you’re able to test the in- and output of a Template Building Block used in a Component Template (with a specific component). Making it easier to find problems in a specific Template Building Block. Additionally, Stack Traces are shown when an error is thrown. |
|
| Debugging With the correct (network) access you can use the ‘standard’ remote debugging capabilities of Visual Studio .NET and so debug the Tridion .NET assemblies. |
Only one minor Con and four major Pros. So, Yea for Tridion .NET Templating. It’s a major step forward, the development, testing and debugging capabilities will make the Tridion developers live much easier.
Though don’t expect it to speed up the implementation of Tridion in your (customers) organization, this requires a completely different architecture and approach of Tridion implementations.
(possible) Useful links:
A short introduction
Due to the fact that I don’t have a personal blog, I’ll (ab)use the one Albert has… Thank you Albert.
A short introduction; my name is Gerbrand Smit, I’m a colleague of Albert (also a consultant at Deloitte Consulting) and have been working with Tridion for more than six years now. In those past years I’ve done a great deal of Tridion implementations and have grown really fund of projects where Tridion is involved.
My latest project was with Tridion R5.3 SP1, allowing me to ‘play’ with the new SDL Tridion .NET Templating, I’m going to share some of my views on the subject in the next post.
