How to display Key (Guid) of element in block's editor settings - Editor Appearance - Label field
I am on Umbraco 8.
I want to display the unique Key (Guid) of each element of a blocklist in the label field of the blocklist element.
My blocklist element's data type has a property with alias itemName. So having this AngularJS expression in the "Label" field in "editor appearance":
{{itemName}}
displays the item name in the blocklist element list just fine.
The data type also has an inherited Key property. But when I change the expression to
{{itemName}}, Guid: {Key}
nothing is displayed for Key. Same when I use key.
Is there a way to display this inherited property through an AngularJS expression in the backoffice?
Background:
I have a blocklist, and I want to be able to address specific blocklist elements from code in a view file. I thought it is a good idea to use the unique Key value of the blocklist elements for this. If there is a better way for this, I am grateful for hints.
How to display Key (Guid) of element in block's editor settings - Editor Appearance - Label field
I am on Umbraco 8.
I want to display the unique Key (Guid) of each element of a blocklist in the label field of the blocklist element.
My blocklist element's data type has a property with alias
itemName
. So having this AngularJS expression in the "Label" field in "editor appearance":displays the item name in the blocklist element list just fine.
The data type also has an inherited
Key
property. But when I change the expression tonothing is displayed for
Key
. Same when I usekey
.Is there a way to display this inherited property through an AngularJS expression in the backoffice?
Background: I have a blocklist, and I want to be able to address specific blocklist elements from code in a view file. I thought it is a good idea to use the unique Key value of the blocklist elements for this. If there is a better way for this, I am grateful for hints.
I have reconsidered my approach to the problem. It seems like a "code smell" to me when I have to use an element's Guid in this way.
I now approach the issue differently, without the need for displaying the Guid.
is working on a reply...