Sunday, November 30, 2008

Linking imges in Monorail

A quick one 

Say you have an image or god knows what and  you need to add a link to it, in html you ll do something like



<a href="http://foo.bar/something.html">
<img src="..." /> </a>

in a view you can do this

<a href=$UrlHelper.For("%{ controller='product'}")>  
  <img src="$!Image.Path" alt="$!Name" />
</a>


No comments: