Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolving Images for Input Buttons with SDL Tridion Compound Templates

Tags:

tridion

I have the following sample code output from a Dreamweaver Template Building Block (DWT TBB) in SDL Tridion 2011:

<input type="image" src="tcm:33-1995" name="submit"/>
<img src="tcm:33-1995"/>

After the DWT TBB, we are using the Default Finish Actions in the Compound Component Template to resolve the paths etc. When I view this in Template Builder we see that the IMG tag is resolved SRC attribute, but the INPUT tag is ignored.

Is there a way to make the default TBBs resolve INPUT tags as well as IMG tags?

like image 359
Chris Summers Avatar asked Sep 20 '12 14:09

Chris Summers


1 Answers

If I put the following in a DWT:

<input type="image" src="tcm:1-90" name="submit"/>
<img src="tcm:1-90" />

And then put that DWT in a Page Template like this:

  1. DWT
  2. Publish Binaries in Package
  3. Resolve Links

I end up with this Output item in the end:

<input src="http://localhost/Preview/.../img.jpg"  type="image" name="submit"/>
<img src="http://localhost/Preview/.../img.jpg"  />

So how is your output different?

More info

After the DWT is executed, this is the Output item:

<input type="image" src="tcm:1-90" tridion:href="tcm:1-90" 
       tridion:type="Multimedia" tridion:targetattribute="src" name="submit"/>
<img src="tcm:1-90" tridion:href="tcm:1-90" tridion:type="Multimedia" 
     tridion:targetattribute="src" />

The Publish Binaries in Package TBB doesn't modify the Output item, so the Link Resolver changes this to the final Output I showed above.

like image 142
Frank van Puffelen Avatar answered Oct 11 '22 18:10

Frank van Puffelen