Is there any way to use DataList Value "Name" property in Name Templates (for example, in a Block List Editor)? #302
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Yes and no. No, in that only the "value" is available at the point of rendering the Block item. Yes, in that for Umbraco content, I've added an undocumented custom AngularJS filter for this, instead of |
Beta Was this translation helpful? Give feedback.
-
Ah! I figured it out. My DataList allows multiple selections, so if I use this:
It works! Since in this instance, I only want to allow the Editor to make a single selection, I copied the DataList and made a "single-select" version. However, the same Name Template (with the [0]) works. |
Beta Was this translation helpful? Give feedback.
-
A little background on the The source is here: https://github.com/leekelleher/umbraco-contentment/blob/4.4.1/src/Umbraco.Community.Contentment/DataEditors/_/_filters.js#L6-L19 |
Beta Was this translation helpful? Give feedback.
Yes and no.
No, in that only the "value" is available at the point of rendering the Block item.
Yes, in that for Umbraco content, I've added an undocumented custom AngularJS filter for this, instead of
ncNodeName
, trylkNodeName
.