Hi i'm currently learning sitecore 7 with MVC4 and glassmapper and I'm having some issues with the general linkfield. I can't seem to ouput the external links (not links to items) correctly from a general linkfield. What am I doing wrong?
My model:
[SitecoreType(TemplateId = "{F8168BAF-6916-47FE-BC7F-DE3B033CE233}")]
public class SocialLink : AbstractBase
{
[SitecoreField]
public virtual string Description { get; set; }
[SitecoreField]
public virtual string Class { get; set; }
[SitecoreField(FieldType = SitecoreFieldType.GeneralLink)]
public virtual Link Url { get; set; }
}
in the view:
@foreach (var socialLink in Model.SocialFolder.Socials)
{
<a href="@socialLink.Url" class="connect @socialLink.Class">@socialLink.Description</a>
}
Output:
<a href="Glass.Mapper.Sc.Fields.Link" class="connect slideshare">Read us on Slideshare</a>
Thanks in advance.