Hi I am new to glassmapper and i am trying to create a simple view rendering. While the view works, i am not able to edit it in experience editor. Is there like a setting that i should turn on???
My View is as simple is this:
@inherits Glass.Mapper.Sc.Web.Mvc.GlassView<sample.Web.Models.sampleclass>
@if (Model != null)
{
<div>
@Editable(Model,x=>x.Title)
</div>
}
My Modal:
using Glass.Mapper.Sc.Configuration.Attributes;
using System;
namespace Sampple.Web.Models.Sampleclass
{
[SitecoreType(TemplateId = "{FE05DA0F-7E18-47F8-AB77-F0ED7A0F9F90}",AutoMap = true)]
public class Sampleclass
{
[SitecoreId]
public virtual Guid Id { get; set; }
public virtual string Title{ get; set; }
[SitecoreField("Page Content")]
public virtual string Body{ get; set; }
}
}
I am able to see the content. It just that it is not editable when i open
http://mysite/?sc_mode=edit
Sidenote: i have changed the class names for explanation. Please ignore any typos