Copied to clipboard

Flag this post as spam?

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


  • Openfield Creative 62 posts 222 karma points
    Mar 25, 2015 @ 22:30
    Openfield Creative
    0

    Syncing umbraco node name with field in custom property editor

    The property editor I'm creating has a name field in it which would be a duplicate of the Umbraco name field. I'm trying to get the two to sync up and have had some success, but it's not quite what I would like. So far I have managed to get a saved node to update the property editors name field based on the node name, but then I get a 404 error on getById in Umbraco.

    enter image description here

    What would be ideal to me is to be able to sync the Umbraco Name field and the property editor name field as a user types in the Umbraco field (or vice versa really).

    So I really have three questions:

    Is it possible to assign the umbraco node name from a property editor field by syncing property editor to the node name field?

    If that isn't possible can you do an update while typing sync between an umbraco field and a property editor field?

    And if neither of those are possible, what would be the best way to handle the contentService error through Umbraco?

    Here is the code I'm using to sync the two fields at the moment:

     contentResource.getById(editorState.current.id).then(function (node)
            {
                if (node.name != $scope.model.value.name)
                {
                    $scope.model.value.name = node.name;
                }
            });
    

    Thanks in advance for any help.

    Owen

  • Rune Antonsen 29 posts 145 karma points
    Jan 31, 2017 @ 14:02
    Rune Antonsen
    0

    Did you find a solution for this Owen?

Please Sign in or register to post replies

Write your reply to:

Draft