It appears with your transformation you're attempting to set specific pieces: a link URL and an image source. If you check out the blog post again, you'll see there is a user control which is actually creating the links and such dynamically without you needing to code them. Here's the full code of the transformation:
<script runat="server">
protected override void OnInit(EventArgs e)
{
CMS.DataEngine.DataClassInfo dci = CMS.DataEngine.DataClassInfoProvider.GetDataClassInfo(Eval("ClassName").ToString(), true);
if (dci != null)
{
CMS.FormEngine.FormInfo fi = new CMS.FormEngine.FormInfo(dci.ClassFormDefinition);
// field name we added in the page type
CMS.FormEngine.FormFieldInfo ffi = fi.GetFormField("Images");
Guid AttachmentGroupGUID = ffi.Guid;
ucDocAttachments.Path = Eval<string>("NodeAliasPath");
ucDocAttachments.AttachmentGroupGUID = AttachmentGroupGUID;
ucDocAttachments.TransformationName = "CMS.Root.DocumentAttachments";
ucDocAttachments.ReloadData(true);
}
}
</script>
<div class="vehicle">
<div class="vehicleDescription"> <%# Eval("VehicleType") %></div>
<div class="lineItem"> <span class="lineDescription">Description:</span> <%# Eval("Description") %>.<br /> </div>
<div class="lineItem"> <span class="lineDescription">Mileage:</span> <%# Eval("Mileage") %> miles<br /> </div>
<br/>
<%# GetAttachmentIcon("AttachmentGUID") %>
<a class="vehiclePhoto" target="_blank" href="<%# GetAbsoluteUrl(GetAttachmentUrl(Eval("AttachmentName"), Eval("NodeAliasPath")), EvalInteger("AttachmentSiteID")) %>">
<%# Eval("AttachmentName",true) %>
<cms:DocumentAttachments ID="ucDocAttachments" runat="server" /></a>
</div>
Notice that <cms:DocumentAttachments ID="ucDocAttachments" runat="server" />
is in the transformation and also referenced in the <script runat="server">
tag. This step needs to happen to properly bind the control with the attachment data.