Copied to clipboard

Flag this post as spam?

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


  • Thomas Kahn 503 karma points
    Jun 11, 2010 @ 11:39
    Thomas Kahn
    0

    Contour: Save as Umbraco document with dynamic parent (where to save)?

    I'm new to Umbraco Contour, but after just 1 hour I have figured out how most things work and I must say that it's worth every cent! Wonderful add-on! Great job!

    Now to my question:

    I'm working on a solution where I will have the same form on 8 different pages on my site.

    The pages represent people, so let's say that I'm on Brenda Oswalds's page, users can use the form to ask Brenda a question. If I'm on Kevin Smith's page, the user will use the form to ask Kevin a question.

    On submit the form info is saved as an Umbraco page. I've seen that I can specify a location where I want the new page to be saved (the "where to save" parameter).

    Is it possible to set a more dynamic value for "where to save", something like (pseudo code): save the new page as a subpage to the page where the form instance is currently on?

    If that's not possible, my other option will be to create 8 separate forms with 8 separate workflows, each with its own "where to save" parameter value. I just thought I'd check before I go about creating all these forms.

    Regards,
    Thomas Kahn

  • Michael Lawrence198 karma points
    Jun 13, 2010 @ 21:32
    Michael Lawrence
    0

    You could just create a custom workflow that handles this I imagine. Maybe it could read from a property from the document type of the current page that tells it what the parent ID you want to save to is?

  • Thomas Kahn503 karma points
    Jun 14, 2010 @ 11:14
    Thomas Kahn
    0

    Hi Michael!

    Yes, it looks like a custom workflow is the only way to accomplish this. I'm not sure if I have the time to dive into that - I have a tight deadline to meet.

    Thanks for yor reply!

    /Thomas

  • Michael Lawrence198 karma points
    Jun 16, 2010 @ 21:06
    Michael Lawrence
    0

    Haha, now I have a new project where I need the workflow to do exactly this! You didn't happen to work on a custom workflow that accomplishes it did you?  If not, is the source available for the existing workflows so we can modify them to suit our needs? It would be a shame if we had to rebuild this workflow from scratch just to modify a single setting.  Any of the Contour developers can chime in on this?

    Thanks!

  • Michael Lawrence198 karma points
    Jun 16, 2010 @ 22:40
    Michael Lawrence
    1

    Actually after some digging around I found this link:

    http://our.umbraco.org/FileDownload?id=775

    So I tweaked it out and just changed one of the settings to be a textfield instead:

    http://codeviewer.org/view/code:ff4

    Just set the "Where to Save" setting to [#pageID] and it will save it to the current page! I hope this saves you some time :-)

  • Michael Lawrence198 karma points
    Jun 16, 2010 @ 22:41
    Michael Lawrence
    0

    That link was actually supposed to be http://codeviewer.org/view/code:ff4

  • Michael Lawrence198 karma points
    Jun 16, 2010 @ 22:43
    Michael Lawrence
    1

    Today is not my day! Also, how do I edit/delete posts on here? I don't see a button for that.  Anyway, the REAL correct link is:

    http://codeviewer.org/view/code:ff4

  • Thomas Kahn503 karma points
    Jun 18, 2010 @ 09:03
    Thomas Kahn
    0

    Thanks Michael!

    The site I'm working on is a campaign site so production speed goes before long term solutions (quick'n'dirty). Therefore I decided not to dig any deeper into custom workflows. I have now set up eight different forms, which is of course not the optimal solution, but once they're up it works like it should. I used the dictionary for storing common texts (the "thank you text" and tooltips) and created a template for my form. That way I could create all the forms and the workflows quite fast.

    Your solution is of course much better and it's great that it's here in the forum for future reference for others to look at.

    /Thomas Kahn

Please Sign in or register to post replies

Write your reply to:

Draft
Our.umbraco.org is the community mothership for Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community.