I have a Article View Rendering that contain Datasource Location that points to its Article Datasource item. The view rendering cshtml file is Article.cshtml. I'm using Glass Mapper to map Article Model on View.
[SitecoreType(TemplateId = "{3C578C91-12FD-4E43-A9EB-4AEB053D0F8E}", AutoMap = true)]
public class Article
{
[SitecoreId]
public virtual Guid ID { get; set; }
[SitecoreField]
public virtual string Tittle { get; set; }
[SitecoreField]
public virtual string Text { get; set; }
[SitecoreField]
public virtual string Colour { get; set; }
}
But on Page get Article Rendering,i have Article Metadata section,i want to get field of that on Views include Article.
[SitecoreType(TemplateId = "{B3B677AC-1C3B-44E8-91B7-14B42C77058E}", AutoMap = true)]
public class WebPage : IArticleMetaData
{
[SitecoreField]
public virtual string Title { get; set; }
[SitecoreField]
public virtual string Description { get; set; }
}
[SitecoreType(TemplateId = "AACF09E7-A7B8-4D32-946B-B84098738BEE", AutoMap = true)]
public interface IArticleMetaData
{
[SitecoreField]
string Title { get; set; }
[SitecoreField]
string Description { get; set; }
}
Any soloution for that?Thanks