Copied to clipboard

Flag this post as spam?

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


  • Jon Cousins 5 posts 25 karma points
    Jan 30, 2013 @ 12:20
    Jon Cousins
    0

    Set nodeName using c#?

    I thought maybe it was something like this:

    doc.getProperty("nodeName").Value = "New node Name";

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 30, 2013 @ 12:25
    Jan Skovgaard
    0

    Hi Jon

    You can see more about how to use the API here: http://our.umbraco.org/documentation/Reference/management/Documents/

    You set the nodename, when creating the node like it's shown in the section "Creating a Document and setting properties".

    Hope this helps.

    (I'm not sure if this is still true if you're playing around with v6 though).

    /Jan

  • Dan 1288 posts 3942 karma points c-trib
    May 13, 2013 @ 16:04
    Dan
    0

    Hi,

    I'm looking to do this.  I see from the docs how to create a new node with a specific nodeName but I can't see how to edit the nodeName programatically.  Can anyone suggest how to do this (4.7.1)?

    Thanks

  • Devin Gleason Lambert 27 posts 89 karma points
    Mar 19, 2015 @ 18:06
    Devin Gleason Lambert
    0

    Hey,

     

    Found an answer to this on Stack Overflow that works in 6.1.1

    http://stackoverflow.com/questions/26137761/change-the-name-of-content-using-the-content-service

     

    From SO:

     

    For changing Node Name you have to do something like that :

     umbraco_node.Name="32"; contentService.SaveAndPublishWithStatus(umbraco_node);

    Don't forget about publishing node.

    Cheers,

    Devin

  • 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