Skip to main content

Posts

Showing posts with the label Tridion 2011SP1

Yet Another Event System - Revisited

As a followup of my previous post Yet Another Event System? , it is time for a follow up on the code and examples. The code has been added to Google Code and it's available for free at  YAES source code . You can simply download the entire solution and start coding. If you're only interested in the main functionality class, go directly to ConfigurationManager.cs . Installation This is a normal Event System installation process: Copy the compiled Event System DLL to a location of your choosing Reference the DLL from file [Tridion_Home] \conf\Tridion.ContentManager.config , in section configuration / extensions / add , attribute assemblyFileName Copy a .config file to the same directory where your Event System DLL is located, and name it the same as your DLL, but with extension .config Restart Tridion processes. For knowing exactly which process to restart, have a look at my earlier post  Debugging a Tridion 2011 Event System Configuration The .config file al...

My Own 'Core Service'-based Purge Publishing Queue

After blogging about my beautiful script on purging old Publish Transaction from the Publishing Queue, it turned out the PurgeQueue.exe tool provided by SDL with SDLTridion 2011 simply did not work. More exactly, I was attempting to delete Publish Transactions with any status (Success or Failed) from the Publishing Queue, that had a date earlier than one year ago today. PurgeQueue.exe runs and displays a message that the Publishing Queue has been purged. In fact the Publish Transactions were not deleted and still appeared in the Publishing Queue. So it was time to write my own custom PurgeTool, using the Core Service .NET API. The requirement stays the same -- delete Publish Transactions that are at least a year old. I started with the programmatic instantiation of the the Core Service client, as described in my earlier post Core Service Client Sample Code . Once I had a SessionAwareCoreServiceClient   client object the rest of the code is trivial: PublishTransactionsFi...

Purge Publish Transaction Script

Ok, it's time to do some maintenance and performance tuning on your Tridion CMS. One of the things you should keep an eye is the size of the Publishing Queue. This can grow quite large over time depending on the amount of publishing going on daily. Tridion comes with a very handy tool -- the Purge Tool, which allows trimming the size of the Publishing Queue. I won't go into what the tool can do; there is documentation for that. The following little script is perfect to run inside a Windows batch script and schedule it to execute periodically. In its current state it deletes Publish Transactions that completed more than 1 year ago relative to today's date. @echo off set /a LastYear=%DATE:~10,4%-1 set OneYearAgo=%LastYear%/%date:~4,5% echo OneYearAgo=%OneYearAgo% echo TRIDION_HOME=%TRIDION_HOME% @echo off > "%TRIDION_HOME%bin\purge.xml" & setLocal enableDELAYedexpansion for /f "tokens=* delims= " %%a in (purgeTemplate.xml) do (...

REL Standard Tag Library - Installation

This post explains the steps to install RSTL on your Tridion presentation server. For more information about RSTL, check out my post  REL Standard Tag Library . To download RSTL go to my Google Code page . Always use the  latest JAR . Prerequisites Although installation itself is very simple, there are some prerequisites: Install and configure a Content Delivery server. This can be either a Java or .NET. If CD API is used, make sure you call the PageContentAssembler to assemble Pages and ComponentPresentationAssembler to assemble Component Presentations. This ensures the REL tags are executed; If CD Web Service (OData) is used, make sure all content is published to the CD DB; Create and configure a Deployer that publishes the content and/or metadata to the CD DB: For CD API, content does not have to be in the CD DB, but in order to execute REL tags it should be; for OData, all content and metadata should be in the CD DB; Create and configure a Publication ...

REL Standard Tag Library - Expression Language

The REL Standard Tag Library (RSTL) is the Tridion equivalent to JSTL (JSP Standard Tag Library) and aims to provide the same functionality for Tridion REL. This post presents the Expression Language used in RSTL tag attributes. If you are interested in the RSTL itself, check out my post REL Standard Tag Library . RSTL can be downloaded from my Google Code page, under REL Standard Tag Library . Always use the latest JAR . Expression Language The tag attributes support an expression language allowing it to reference existing context variables, to evaluate mathematical and conditional expressions. I implemented an expression parser to evaluate such expressions. ${ expression } Notation This notation is available inside tag attributes. The parser evaluates the expression inside (as mathematical expression) and returns its value. Logical Expressions Logical expressions produce a boolean value: true or false . Syntax:     [!|not] expression [ logical_operator ...