“The” Navigation Debate

Please see below slides for the discussion we hope to have initiated in the Community Webinar held on the 14th March 2012.

Essentially, as a wise man once noted, there are as many ways of rendering navigation as there are Tridion Consultants… The purpose of this discussion is for us, as a community, to share and discuss our experiences.

Please feel free to post links to blogs with specific examples but ideally here we would have more of a discussion of why we would choose one method over another (implementation timescales, environment, editor requirements etc.) and whether, on reflection, previous decisions would be the same…

Let’s talk….

community-webinar-navigation

What the REL?! – A simple and very practical use of REL

SDL Tridion introduced a new target language in the 2011 release – rather mysteriously named REL. Discussions on what exactly this is for tend to very quickly get rather technical and revolve around Dynamic Rendering, developing custom tags in Java, the new Content Delivery web service and such.

Continue reading

Installing SDL Tridion Hotfixes from a Network Location

This is not strictly an SDL Tridion issue, but I figured I would share it here in case others ran into the problem.

I just installed a hotfix on my development machine for a publish states issue in SDL Tridion 2011 SP1 which fixed a problem on marking items as published or not after installing the service pack. To apply the hotfix I needed to install an updated Tridion.ContentManager.Publishing.dll into the GAC. Continue reading

Whitespace in SDL Tridion SP1 XML

Before reading this, and getting too alarmed, this blog of caution really only applies to those who use XSLT templates (either using the XSLT Mediator or traditional XSLT Component Templates). Although it may have a wider impact that I am not aware of.

I just upgraded a client implementation to 2011 SP1, and mysteriously some of my components were failing to publish. At first this seemed to be a template issue, but on further inspection it became apparent that components that had been made before the SP1 upgrade were fine, and those create or edited after the upgrade were failing.

In one of our XSLT Template Building Blocks, we essentially copy the XML of the Component in order to make all the data available to the presentation code. In addition to copying the nodes, we also add some additional attributes.

<image>
    <image xlink:type="simple" xlink:href="tcm:0-114344" xlink:title="ross" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</image>

Gets transformed by our template to

<image Orientation="portrait" Photographer="- Not applicable" Illustrator="">
    <caption>Some Caption</caption>
    <image type="pub148w" height="148" width="60" src="tcm:417-117248" uri="tcm:417-117248" /
    <image type="pubArticleFull" height="480" width="640" src="tcm:417-117248" uri="tcm:417-117248"/>
</image>

This was working perfectly from version 5.3 up until 2011 GA. However we discover that the XML of components saved using SDL Tridion 2011 had changed

GA XML

<image><image xlink:type="simple" xlink:href="tcm:0-114344" xlink:title="ross" xmlns:xlink="http://www.w3.org/1999/xlink" /></image>

SP1 XML
<image>       <image xlink:type="simple" xlink:href="tcm:0-114344" xlink:title="ross" xmlns:xlink="http://www.w3.org/1999/xlink" />       </image>

The additional whitespace was being added to the image node by my XSLT template, and it was preventing me from adding the Orientation, Photographer and Illustrator attributes to the element (you can not add attributes with XSLT to a node after adding text, whitespace or nodes)

To get around this I have added <xsl:strip-space elements=”*”/> to the top of my XSLT which fixes our problem, but it does mean we now need to validate the output of all our templates to make sure we are not stripping out any whitespace that we actually need.

Lesson of the day: Never write an XSLT thinking whitespace is irrelevant.

You decide whether you think this is a bug or not, but in the meantime, I hope this post might help you debug any XML related woes you stumble upon after upgrading to SP1.

Fixing GUI issues after upgrading to SDL Tridion 2011 SP1

I have just finished upgrading a client’s SDL Tridion 2011 GA instance to SP1, and on the whole the experience was fairly painless with the exception of my post on publishing permissions and some minor issues with the Content Manager Explorer (CME).

I believe my client was one of the earlier adopters of SDL Tridion 2011 GA, and we applied a number of early hotfixes to the GA instances. My guess is that we may have installed some “unapproved” hot fixes which we not versioned correctly or that in a debugging effort I accidentally saved some files whilst hunting for a problem.

This appears to be the root of the latest problems we have seen. In an effort to not mess up any customized code or configurations, the SP1 installer does not update any files with unknown versions. In our case this meant that several files were not updated, and the CME was not functioning correctly (several items were not loading or saving, and various JS errors were appearing) even though the installer appeared to have completed successfully.

Continue reading

Impress your IT Operations Peers. SDL Tridion + A Simple APM Client

Application Performance Monitoring or Management (APM) means nearly completely different things depending if you’re on the development (R&D) or operations (database/server administration) side of information technology (IT). It’s a different scale, different focus, and different vendors. To get a flavor of this, ask around for APM licensing models.

As a Web application with external APIs, extension points, OS-level events, and plenty of logs, SDL Tridion can be monitored however you see fit, with your vendor of choice. If you’re an avid Tridion World or documentation reader, you already know how to monitor publishing as far back as Tridion 5.3 per Julian Wraith’s article (I’m teasing, I missed this one until I recently searched for Tridion’s monitoring capabilities). 

Continue reading

The story of SDL Tridion 2011 Custom Resolver and the allowWriteOperationsInTemplates attribute

Before I start with this blog, let me thank all those who have helped me find my way whilst stumbling around in the forest on this one, you know who you are. Had I read the release note properly over a year ago, I am sure I would never have made this journey, however I have learned a lot and figured I would share what I found.

A long, long time ago, in an office somewhere in the Netherlands I decided to make a VBScript Component Template for Tridion R5.0 which created the HTML for an article, and then published a summary DCP (Dynamic Component Presentation) for inclusion in a broker driven index page. I was a happy man.

Sometime later, I was at a client in Norway, and I only had rights to make templates and pages etc. My client needed me to create a new user in the CMS. The Tridion Administrator was on vacation, so I made a template that created a new user in the system. Again, I was a happy man. Continue reading

Using XPath to find XML Elements with Inline/Default Namespace and Null Prefix

On the last SDL Tridion Community Webinar, Dominic Cronin suggested a great alternative to Regex for finding, adding, removing, or replacing certain elements or attributes, such as Component Links within Components (or Pages).  The more data-safe approach is to manipulate the Component source as an XML document [via XPath] rather than regex.  I gave it a shot, except that getting (what seems like) a simple XPath query to work took way more effort than I anticipated.  All of this due to a little unknown detail about XPath queries for items in the default namespace without a prefix.

Continue reading

JavaScript Compression in SDL Tridion (minification and obfuscation. CSS too)

I’ve been building up my jot notes throughout the year and finally got the chance to make them into publishable form, which lead me to this sudden series of articles. Thanks, John, for letting me post on your site.

To achieve maximum compression on a JavaScript file, minification is not enough.  Obfuscation is where it’s at.  This means replacing variable names to the shortest amount of characters (or bytes) that the language syntax allows.  For example: var myReallyLongVariableName=”foobar” would become var a=”foobar”; but only within its scope, and so on.  You basically have to implement a decent chunk of code that usually comes as part of any language interpreter or compiler.  It’s quite a bit more involved than minification alone.  My point is, use a proven package that does this and just hook it up to the best CMS known to man.

My preferred way is actually to not store JavaScript or CSS in Tridion.  Put it with the rest of your website’s code into the repository like TFS or Subversion.  Basically, bundle it into your build process which should go through Change Management with the likes of JAR/DLL files and DB packages.  JS is code after all.  This way you can just add a step to your build process.  Ask the build master to crunch the JS/CSS through a compressor (possibly as a manual step) before or automate within an ANT, NANT or MSBuild script.  If, however, you are a content author or Support person that hates dealing with your org’s Change Management process or have some other reason to store js and/or CSS code as easily publishable as content, then this is for you.

Continue reading