When wrapping an image with a link, you will need to pass the context into the field. In your view, put the following code.

 
@using Sitecore.Mvc.Presentation
@using Sitecore.Mvc
@model Sitecore.Sharedsource.Mvc.Presentation.RenderingModel

@Html.Sitecore().BeginField("Link", Model.Rendering.Item, new { haschildren = true })
 @Html.Sitecore().Field("Image", Model.Rendering.Item)
 @Html.Sitecore().EndField()
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s