Have you tried just using the Html.PropertyFor() extension method to generate the markup code? It should be very similar to the <EPiServer:Property web control and render different markup based on the type and content.
Frederik
I'm not having problem with understanding the MVC extensions I've been using Html.PropertyFor() extensivly when I can I just don't see how in this scenario. Effectivly I have a block which has 2 properties, one that's a Url but set to be an image using the ui hint and one that's a standard Url. The user need to be able to set the image and then set the Url and then in the block razor I want generated
<a href="{URLLOCATION}">
<img src="{IMAGELOCATION" alt="{IMAGEDESCRIPTION}" />
</a>
I've already got all of the code for pulling the description from the asset library out but I couldn't see a way on PropertyFor to set a template, all I need is the href location that is autogenerated by PropertyFor.
I have created a block that contains a property marked as Url so that a user can select either a page, external link ect. However my block contrain a hyperlink wrapping an image tag so unless i'm mistaken I can't use the Html helpers to generate the link. I want code to work out what the correct link would be e.g.
I used to be able to do this in 6 but am having trouble finding the necessary code to just get me the correct Href attribute for each of the different types.
Thanks,
Scott