Copied to clipboard

Flag this post as spam?

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


  • Sa 118 posts 152 karma points
    Sep 14, 2009 @ 09:56
    Sa
    0

    convertion

    how to assign documentObject.ContentType.Alias to  documentObject.Parent.

     

    i am getting conversion error:

    Error    1 Cannot implicitly convert type 'string' to 'umbraco.cms.businesslogic.CMSNode' 

  • Bogdan 250 posts 427 karma points
    Sep 14, 2009 @ 14:15
    Bogdan
    0

    documentObject.Parent is in fact a node, to get its alias you can try something like documentObject.Parent.getProperty("nodeTypeAlias").Value

  • Sa 118 posts 152 karma points
    Sep 14, 2009 @ 14:41
    Sa
    0

    i want set value to documentObject.parent

  • Mikael Mørup 297 posts 326 karma points
    Sep 14, 2009 @ 21:28
    Mikael Mørup
    1

    Is it possible to change the NodeTYpe after a node is created ?

    I thought that was a no go ??

    Mikael

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Sep 17, 2009 @ 01:58
    Nik Wahlberg
    0

    I belive Mikael is correct here. This cannot be set after the node has already been created using a particular nodeTypeAlias. I can't say that I have tried it, but I am fairly certain this is the case.

  • Mikael Mørup 297 posts 326 karma points
    Sep 17, 2009 @ 09:19
    Mikael Mørup
    0

    It makes sense too.

    When a page is created from a specific doc. type all the properties of that doc. type is put in the database with the values given to them on the page.

    If you then try to change the doc. type to another one, what should happen to all the properties from the original doc. type ? and how should the properties of the new doc. type be populated ?

    One way to acomplish the same would be to delete the original page and ad a new page with the same name, but a new doc. type. But you would still need to populate the new doc. types properties in some way.

     

    Mikael

Please Sign in or register to post replies

Write your reply to:

Draft