Building content editors and adding editors programatically

Topics: Core, Writing modules
Mar 5, 2014 at 10:23 AM
I have built an editor for user, and I have added an editor shape. This is all working fine and has been running in production without a hitch. I now need to add another editor shape at the end of the editor for user. So I added:
editorForPerson.Metadata.Position = "20"
However, this is set to null as soon as I call
Is this a bug or is it just how it supposed to work, so that placement can set the values? Since this is just a random little shape I have put together, there is no placement for it, I assume? Or am I just going about this all the wrong way.

Mar 5, 2014 at 10:47 AM
Okay well I solved it for my particular case by adding it to the sidebar, where the button is. ie.
Mar 5, 2014 at 10:55 AM
Scrap that, it isn't a bug or anything, adding a shape takes in a optional parameter of position, which overwrites whatever you set the position as with null if you don't add the position parameter.

So the solution is:
editorForUser.Content.Add(editorForPerson, "20");
Marked as answer by Hazza on 3/5/2014 at 2:56 AM