1

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

Night Monger
  • 770
  • 1
  • 10
  • 33

1 Answers1

0

I this fixed?

If not, try below options:

  • When you open Sitecore Item in Experience Editor and when clicked on any field you must see those fields highlighted as in below screen shots, Then try to edit it within that highlighted area

Screen Shot 1

Screen Shot 2

  • if you are at the right place and if it is till not working. Can you check Sitecore Logs if there are any errors recorded.

  • Looking at the code it looks like you missed to map "Title" field.

Akhil
  • 165
  • 1
  • 13
  • unfortunately.. not yet.. Weirdly i am not seeing the ribbon at all under experience editor. There are no errors in data logs or in browser. I can see the ribbon under preview mode though.. http://imgur.com/a/im3IV – Night Monger Dec 28 '16 at 21:51
  • Also i did not have to map the title because it was the same field name. The web works. i am able to see the values. Just editing doesnt work. – Night Monger Dec 28 '16 at 21:58
  • @kveey Is the content within wrapped within
    tag, Something like this
    ...
    . Also refer http://stackoverflow.com/questions/33541265/experience-editor-is-not-showing-the-ribbon-options-in-sitecore-8
    – Akhil Jan 03 '17 at 07:29