Copied to clipboard

Flag this post as spam?

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


  • Johan 188 posts 380 karma points
    Feb 19, 2014 @ 10:15
    Johan
    0

    xPath

    I'm trying to save a submitted form to multiple umbraco documents. The nodes are all of the same document type. Under "Where to save" i have entered the following xPath:

    $currentPage/ancestor-or-self::* [name() = 'myDoctypeAlias']/@id
    

    This doesn't work but maybe you can see what I'm trying to do. Is it at all possible to save to multiple nodes?

  • Comment author was deleted

    Feb 20, 2014 @ 08:26

    You'll always have to specify an id :) but the xpath will of course be evaluated when you are on the site so it will save to different nodes...

    try $currentPage/ancestor-or-self::MyDoctypeAlias/@id
  • Johan 188 posts 380 karma points
    Feb 20, 2014 @ 10:58
    Johan
    0

    Thanks Tim,

    I have tried everything now. It always puts the node in the root. I'm submitting the form with '/base/submitContourForm/CreateRecord.aspx?formGuid=' + myFormGUID;. Do xPath work when submitting with javascript?

    Edit: Updated from version 3.0.18 to version 3.0.19 but can't get it to work.

  • Johan 188 posts 380 karma points
    Feb 21, 2014 @ 11:27
    Johan
    0

    I tried adding the form the standard way with a Macro. That worked better when using xPath. So is this a bug maybe?

    I still couldn't create multiple documents though. I guess you'll need a xslt:for-each to select all ID:s. If i want the form to create a node under every node with a specific document type. How is the best way to do this? Maybe extend umbraco and create the nodes with .NET?

  • Comment author was deleted

    Feb 21, 2014 @ 12:52

    Problem with the base approach is that the workflow doesn't know what page you are on so that's why xpath doesnt work...

Please Sign in or register to post replies

Write your reply to:

Draft