Copied to clipboard

Flag this post as spam?

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


  • Dinovo 40 posts 59 karma points
    May 09, 2010 @ 14:19
    Dinovo
    0

    Doc2Form - pageid of created node?

    I am building a page which utilizes Doc2Form to create a new node in the content tree upon submission. The form is to insert the data as a new node and then redirect to a predefined page - all this works flawlessly. One thing i am struggling to figure out, is how to get the @id of the created node (by Doc2Form) which i can get somehow get/request on the page that is redirected to (preferably using xslt?)

     

    Any ideas?

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    May 09, 2010 @ 22:03
    Chriztian Steinmeier
    0

    Hi Dinovo,

    The generated page will be the last child of the page you tell Doc2Form to save to ("ChooseWhereToStore"), so you could take that id with the following XSLT snippet:

    <xsl:value-of select="umbraco.library:GetXmlNodeById(_ChooseWhereToStore_ID_Here_)/node[last()]/@id" />

    (This, of course, is not a "safe" solution if the page will be hit by many different users at the same time, because then you can't be sure that the id you're getting was created by the same user...)

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft