Using a custom MVC render engine to speed up DD4T development

Reverend Green in the Conservatory with the Lead Piping?

Reverend Green in the Conservatory with the Lead Piping?

Recently I’ve been performing some post-launch improvements to a DD4T site for a client.  A number of their requests have been along the lines of improving screen element <x> on page <y>.

The project is reasonably large with the website being comprised from a couple of hundred abstract MVC views.  A good amount of nested, view re-use, with nice generic css classes has actually been a detriment when it comes to tracking down exactly which view screen element <x> originates from.

Occasionally you find a view that includes some ‘start’ and ‘end’ comments in the output.

<!-- Start View: Example -->
  View contents go here...
<!-- End View: Example -->

Continue reading

Setting up Contextual Image Delivery in a (DD4T) MVC .NET Website

curryIf you hadn’t noticed, SDL Web released a new product recently: Contextual Image Delivery, which in short enables you to resize, crop, trim and convert formats for images. I thought I would see how easy it was to set up in an ASP.NET MVC environment, and it went pretty well, but there are a few subtleties Continue reading

SDL Tridion for Dummies Part 1 – an analytical start

In Bart Koopman’s previous post he asked if we wanted to take the SDL Tridion Template Quick Guides “one step further?” This answers that question with a first analytical step of the microsite in order to create a Web Content Model. This exercise is similar to creating a data model before a database or creating class diagrams before programming. Before setting up a CMS that lets us define how we manage pages and content, we first identify types of pages and their relationship to content and each other.

Two-Steps Analysis:

  1. Identify and describe page types
  2. Identify and describe content types

Caveat: to stay at the “Dummy” level, we pretend we have client and business requirements while assuming and skipping parts. For example, we are assuming the BluePrint is already set up. Easy!

This analysis will make sure you as the template developer and the client know what you’re building together. Frank M. Taylor explains why we really should gather CMS requirements:

Paceaux aka Frank M. Taylor has had scope blow up on him, like the Minecraft creepy he doesn't notice behind him.

“The scope can creep as much as it wants when you never establish it.”

Continue reading

Made easy by Event System: Mirror Live publishing on Staging

PublishTargetsWhile working on migrating a 2009 Event System to 2013 SP1, I was looking at a requirement implemented to ensure that publishing actions to Live are always mirrored on Staging – thus making sure that Staging also has the latest versions of content, and indeed has old content removed without relying on the Editors remembering to check the Staging checkbox on the Publish popup. The existing code was rather complex, but when I tried playing around with the 2013 Event System in .NET, I found it was rather simple to implement… Continue reading

Publish an Image to a Structure Group Mirroring Folder

I often run into a scenario where clients ask to publish an image to a directory on the server.  Below is a TBB that does just this.  It publishes an image to a Structure Group that has the same relative path as the Folder. So you can right-click on a image and choose Publish in Tridion and then have it end up in, what appears to be the same folder on the delivery server (works great for untrained developers that just want to reference a src path).

Continue reading

The Solution to Hardcoding Component Template IDs in Nested Component Presentations

Sometimes we have a need to render a nested Component using its Component Template.  The Tridion API provides us with the following function:

@@RenderComponentPresentation(nestComp.ID, "tcm:x-y-z")@@

Now, the problem with the above is that if we hardcode TCM IDs all over the place, our template becomes non-Content Porter friendly. If we port this thing from our DEV CM to QA and PROD CMs, then we have to have a step in our deployment procedure runbook to update the TCM IDs everywhere where this is done.

One way to solve this is to provide the ability to refer to the nested Component Template by name instead of the TCM ID.  So the template code will look as follows:

@@RenderComponentPresentation(nestComp.ID, "${myNestedCTName}")@@

This can be accomplished by a simple Template Building Block that pushes the names of all the Component Templates available in the system onto the Package.  Here is the TBB and an explanation of how to use it.

Continue reading

Context Engine Webinar Resources

teamwork Today I gave an overview of the SDL Tridion Context Engine and how it can be used to provide device detection functionality for SDL Tridion Websites, with a focus on how simple it is to install and use in a RESS / Responsive website.

In the event you missed this presentation, the slides are available after the jump.

Continue reading

SDL Tridion for Dummies – a proposal

SDL Tridion for DummiesPeople have been asking me for years, to write a SDL Tridion for Dummies book. With the release of SDL Tridion 2013 SP1, our documentation features two new getting started guides (Quick Guide to creating a Page Template and Quick Guide to creating a Component Template, note, the documentation requires login, see here for how to get the login details), and these can be seen as two chapters of a For Dummies book.

Now, while these two new quick guides are a revolutionary step forward for people who are completely new to SDL Tridion, I am still missing the explanation behind them. The guides explain you step by step what you need to do to create your first Page/Component Template based on an HTML design, but afterwards you still might not have a clue about what you actually did (or why you needed to do it).

So let me ask you, do you really need a SDL Tridion for Dummies book – the complete edition – taking it one step further than the documentation?

Continue reading