I made a usercontrol for creating and editing forumposts. My question is: when editing a previously created post (node) is it possible to change the name of the node also? I use the node name in the post headings, so if I cant change this I will have to make e new "heading" property.
Yes, the Text property of a Document is the node's name, and you can change it from the user control: doc.Text = "some new node name"; I'm not very sure, but you can give it a try.
it is possible to change the name of a node in .Net, e.g.
Document doc = new Document(123123); doc.Text = "new node name"; //followed by saving/publishing the document and updating the cache
However I would still tend to create a separate field for the heading for 2 reasons: when you change the name of the node you also change it's url and you might end up with some long text containing maybe some odd special characters, and although the CMS will be able to work with all this it's probably not the nicest way to implement things.
Change document name from usercontrol?
Hi
I made a usercontrol for creating and editing forumposts. My question is: when editing a previously created post (node) is it possible to change the name of the node also? I use the node name in the post headings, so if I cant change this I will have to make e new "heading" property.
You can:
hth, Thomas
Yes, the Text property of a Document is the node's name, and you can change it from the user control: doc.Text = "some new node name"; I'm not very sure, but you can give it a try.
Hi Ernst,
it is possible to change the name of a node in .Net, e.g.
Document doc = new Document(123123);
doc.Text = "new node name";
//followed by saving/publishing the document and updating the cache
However I would still tend to create a separate field for the heading for 2 reasons: when you change the name of the node you also change it's url and you might end up with some long text containing maybe some odd special characters, and although the CMS will be able to work with all this it's probably not the nicest way to implement things.
Hope that helps,
Sascha
And that solved it :)
Thank you!
You learn a little every day.
is working on a reply...