Try our conversational search powered by Generative AI!

Local block inline-edit does not support block instance renaming

Vote:
 

As a content editor the option to describe the local block instance in the name is important.
ex: There are cases when multiple editorial text block are used and the only way to differentiate these shouldn't be to open each one.

Naming the blocks are possible with the old style of shared blocks but limited with the new local blocks with the inline-edit mode.

Would it be possible to add the block instance name as a field in the inline-editor?

BR
Mikael

#304357
Edited, Jun 30, 2023 10:56
Vote:
 

Check out the "ShowNameProperty" option here: https://docs.developers.optimizely.com/content-management-system/docs/inline-edit-settings

Defaults to false, but if you set it to true then it should include that property in the popup editor.

#304368
Jun 30, 2023 15:24
Vote:
 

Instead of using the block instance name, you can add a descriptive text in the block's description field. This description will be visible in the block's settings or editor interface, allowing you to differentiate between different blocks.

#304372
Edited, Jun 30, 2023 19:13
Vote:
 

I added the enabled the ShowNameProperty on our base class and the name option would be displayed in the dialog.
The issue now is that it does nothing, I tried to follow the guide and tried to implement the ILocalAssetNameGenerator interface (even to tried to hardcode the result) but the admin interface still displays the initial block name instead and when I edit the block the name field is empty as if it wasn't stored from the beginning.

I'm back on CMS 12.21.x

Any working examples out there of this feature?

#304492
Jul 03, 2023 6:46
Vote:
 

Digging in the database I can find the name property field for regular "shared" blocks in the tblWorkContent table, but this is not the case for local blocks.
I can see the regular local block values in the tblContentProperty but not the name attibute.

Where is the local block name property stored if this is even implemented? The attributes get bundled up with the page values but name field disappears unless I missed some extra table for this.

#304509
Jul 03, 2023 10:54
Vote:
 

I can confirm that behaviour, which is a major pain.
Setting 'ShowNameProperty' displays the Name field and it can be set and saved. But as soon as you publish and open that specific inline block again, the field is empty!

On top I'd expect the name to be shown in content area, but it is not.

Is there a way to disable that feature and/or use old behavior?

btw: We are using content guid for other purposes as well, so using local blocks is a neccessary feature for us.

According documentation inline blocks should contain 'PageName BlockType AutoIncrementId', but it is showing Block Type only. I've set a breakpoint in method Generate(ContentReference parentLink, int contentTypeId) of EPiServer.Cms.Shell.UI.Rest.Internal.DefaultLocalAssetNameGenerator which is not hit, that might be related to that issue.

#305288
Edited, Jul 17, 2023 12:14
Vote:
 

Is there a way to disable that feature and/or use old behavior?

I believe the plan is to add a new setting to enable/disable the new inline block functionality (it's mentioned somewhere in the comments on the release post). 

#305299
Jul 17, 2023 17:45
Vote:
 

I might be addressing the other issue but worth mentioning. We were generating the blocks programatically imported through an API and with this new interface of Inline blocks, doesn't matter if you save it with name it will still have the block's class name. 

Fortunately, We ended up using ListItemHeaderProperty

 [Display(
            Name = "Services",
            Description = "Services",
            GroupName = GroupNames.Tabs.ImportedStationData,
            Order = 110)]
        [Editable(false)]
        [ListItemHeaderProperty(nameof(StationServiceBlock.GenericTag))]
        public virtual IList<StationServiceBlock> Services { get; set; }

The blocks are now using the property of a list item as display name.

#305396
Jul 19, 2023 14:37
* 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.