Try our conversational search powered by Generative AI!

How to make Block Name is editable in Preview?


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)


   @Html.PropertyFor(x => ((IContent)x).Name)

The screenshot

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


Edited, Jan 15, 2020 4:46

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

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.