Category Archives: DD4T

Customizing binary paths in DD4T

SDL Web (formerly called SDL Tridion) has a rather particular way to deal with so-called binary files (images, PDFs, Word documents etc). When published, these files are placed in one folder (typically called ‘images’). To avoid conflicts between different binaries with the same file name, a unique ID is appended to the name of the file. A typical URL of a published binary file would be something like http://mysite.com/images/my-image_tcm3-123.png.

But what if you want to make your own rules for binary paths? And what if you are using the DD4T framework as well? In this post I will explain how to customize the paths to your binaries in DD4T.

Continue reading

Going polymorph with ViewModels in DD4T Java 2.0

Plato (~423 BC – ~347 BC) was a pretty smart guy. Among his many ideas and thoughts, his Theory of Forms had an immense influence on how we perceive and solve the philosophical Problem of universals. It basically comes down to the idea that every physical object has one or more essences (or Forms) and that if that object would not have that Form, it would not be that object: a dog is Mammal, but a giraffe is also a Mammal. What makes both animals Mammals? It’s, simply put, the Idea of the Mammal.

Continue reading

ViewModel functionality in DD4T 2.0 for Java Part III – Complex Field Types

In part II of these series on ViewModel functionality in dd4t–2-java, it was explained how to create ViewModel classes and how to implement basic field types for the mapping between Tridion fields and DD4T ViewModel properties.

This post handles the more complex field types. The reason we make a distinction between ‘simple’ and ‘complex’ is mainly because the complex field types have more options to be deserialized into and need quite some help from DD4T to know what they will become.

Continue reading

A new approach for serving images from a broker database

A picture says more than a thousand words, right? That’s why a web site needs images. In the old days before DD4T, the approach was very simple: out of the box, Tridion would publish your images to the file system, where the web server could pick them up and serve them out to the world.

But in the era of dynamic publishing, who wants to deploy to a file system anymore? One of the advantages of DD4T (or DXA, or any other dynamic framework) is that you publish everything to one central delivery store: the broker database. It makes sense to use this approach for images (and other binary file types) as well. But how?

Continue reading