Copied to clipboard

Flag this post as spam?

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


  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Aug 23, 2012 @ 01:17
    Bo Damgaard Mortensen
    0

    Persist node changes on a custom datatype

    Hi all,

    I've just created a custom datatype which contains an xpath dropdownlist. The dropdownlist is set to display a set of nodes from my content tree.

    Everything works, except for inconsistency whenever one of the nodes has their name changed, the XML cache isn't refreshed (which, I guess, makes sense) Is there any way to make this persistent apart from hooking up on the Publish event for the given document type, which I think seem like a dirty workaround?

    So, i.e.:

    1) The xpath dropdownlist on my datatype is set to a set of 'TextPage' nodes and the nodename of the selected node is stored in the XML for my datatype when the user hits save and publish.

    2) After save and publish, I change the nodename of the selected TextPage node in my content tree, but the umbraco.config isn't updated for my custom datatype.

    Don't know if the above makes any sense. If not, please let me know and I'll try to elaborate :-)

    Thanks in advance.

    All the best,

    Bo

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Aug 23, 2012 @ 14:54
    Bo Damgaard Mortensen
    0

    Must have been one of these nights where I left my brain on the shelf :-)

    There's no need to store the nodename in the XML cache since I can use the node id to reference the node when the name is needed. D'uh.

Please Sign in or register to post replies

Write your reply to:

Draft