Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Johan Reitsma 68 posts 234 karma points MVP
    Jun 29, 2021 @ 19:57
    Johan Reitsma
    0

    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?

  • Bjarne Fyrstenborg 1286 posts 4060 karma points MVP 8x c-trib
    Jun 30, 2021 @ 06:21
    Bjarne Fyrstenborg
    100

    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-stuff

    But 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

  • Anatoliy 6 posts 26 karma points
    Dec 11, 2023 @ 14:07
    Anatoliy
    0

    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).

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies