Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

How to make Block Name is editable in Preview?

Vote:
 

Hi everyone,

I have an issue, I want to edit the block name in Preview in edit mode.

I tried these lines but the Block Name is still not editable:

<h3 @Html.EditAttributes(x => (x as IContent).Name)>
    @Html.DisplayFor(x => (x as IContent).Name)
</h3>

or

<h3>
   @Html.PropertyFor(x => ((IContent)x).Name)
</h3>

The screenshot

Can anyone help me? Or if the Block Name is editable in Preview, can anyone explain help me?

Thanks,

#215822
Edited, Jan 15, 2020 4:46
Vote:
 

The Name proeprty for blocks isn't coming from IContent. Because BlockData is not inheriting the IContent. PageData is inherits the IContent. For BlockData the Inheritance defined as 

BlockData => ContentData => IContentData

Where as PageData => IContent => IContentData

#215831
Jan 15, 2020 12:46
Ten Ten - Jan 16, 2020 2:30
Yeb I know, but is there any way to change the block name by the same way as page name?
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.