November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
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.
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.
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?
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.
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.
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).
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.
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