unfortunatelly i can't find any "dynamic" editor (yet) - most of existing editors are static (data is loaded during page load, there is no communication with sever on a fly).
If i am right - i have to develop own
Umbraco.Community.Contentment.DataEditors.IDataListEditor
to define possibility to load data dynamically (after page load, and depends of existing data on card)
to read and send to the server [page data, set of already changed fields, which are not saved yet, which can make an influence of result]
to define "buttons" to refresh, cleanup items manually
(BTW: previously i have developed same for nupickers? strange - because that is core/visible case).
Contentment example for IDataListEditor
Does anyone have an example of IDataListEditor in contentment? We need a list editor that alsof knows the current node id of the page.
Anyone have an example? Or a better Idea?
Hi Johan
You can find examples how to extend Contentment with a custom data list editor here: https://github.com/leekelleher/umbraco-contentment/blob/develop/docs/editors/data-list.md#extending-with-your-own-custom-list-editor
But in most cases you probably don't need to build your own. There is already Radiobutton list, checkbox list and item picker data lists available.
You could also extend with you own data source using
IDataListSource
https://github.com/leekelleher/umbraco-contentment/blob/develop/docs/editors/data-list.md#how-to-extend-this-with-my-own-stuffBut you can use the existing
UmbracoContentDataListSource
if you need to use XPath like used in configuration of MNTP. https://github.com/leekelleher/umbraco-contentment/blob/develop/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/UmbracoContentDataListSource.cs#L23-L27/Bjarne
unfortunatelly i can't find any "dynamic" editor (yet) - most of existing editors are static (data is loaded during page load, there is no communication with sever on a fly).
If i am right - i have to develop own Umbraco.Community.Contentment.DataEditors.IDataListEditor
(BTW: previously i have developed same for nupickers? strange - because that is core/visible case).
is working on a reply...