I am not able to edit the component in Experience manager, but I can edit in CME.
Also I can edit the page. But when trying to edit the component it shows the following error:
Editing Disabled: Editing this content has been explicitly disabled for all user.to enable editing this content , contact your sdl Application Administrator.
And refreshing the page sometimes I get the following error message:
You are not authorized to edit this component: Your System Administrator has not granted you the rights to modify this component.
I am using the System administrator credential to edit this feature.
This is the sample mark up that has been generated from my code.
<div class="container marketing">
<div class="row">
<div class="span4">
<!-- Start Component Presentation: {"ComponentID" : "tcm:2033-4796", "ComponentModified" : "2015-10-27T12:10:40", "ComponentTemplateID" : "tcm:2033-4740-32", "ComponentTemplateModified" : "2015-10-22T11:37:35", "IsRepositoryPublished" : true} -->
<!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:header[1]"} --> <h2>Ohh God</h2>
<!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:description[1]"} --> <p>god help me</p>
</div>
</div>
</div>
This is my Razor view code:
@model DD4T.ContentModel.IComponentPresentation;
@using DD4T.XPM; @using DD4T.Mvc.Html;
<div class="container marketing">
<div class="row">
<div class="span4">
@Html.SiteEditComponentPresentation(Model)
@if (Model.Component.Fields.ContainsKey("write"))
{
var field = Model.Component.Fields["write"];
@Html.SiteEditField(Model.Component, field)
<h2>@field.Value.ToString()</h2>
}
@if (Model.Component.Fields.ContainsKey("reviewerName"))
{
var field = Model.Component.Fields["reviewerName"];
@Html.SiteEditField(Model.Component, field)
<p>@field.Value.ToString()</p>
}
</div>
</div>