Ali
Ali

Reputation: 1225

Sitecore 7.2 MVC links are not rendering properly

I am using MVC for sitecore 7.2 website, I have a rich html field called body and has links to other sitecore content items.

output HTML for the links is rendered something like this

http://mysite/mypage/~/~/link.aspx?_id=6D705F2DED874D21A1367CB0F4A2F58D&_z=z

I am trying to render actual URL of the content item.

I have tried this but not working for me.

@Html.Sitecore().Field("Body")

I have also tried this but it is getting render as plain text

@Editable(GlassItem, x => x.Body)

Do I need to so some configuration changes??

Upvotes: 0

Views: 178

Answers (1)

Ali
Ali

Reputation: 1225

this worked for me.

@Html.Raw(Sitecore.Links.LinkManager.ExpandDynamicLinks(Sitecore.Context.Item.Fields["Body"].Value))

Upvotes: 0

Related Questions