+ Reply to Thread
Results 1 to 9 of 9

Thread: How to create multiple pages via script?

  1. #1

    Question How to create multiple pages via script?

    Hello,

    we have a customer area in our wiki, and I like to provide the following function in this area:
    A text input field to enter the name of a new customer
    A button starting the following action:
    - Creating a sub page with the name of the new customer (so far not a problem)
    - Creating several sub pages under the page of the customer following a specific structure. (Maybe copy the structure from a master folder, if creating pages via script without user interaction is not possible).

    Is it possible to do this? How?

    Best wishes,
    Peter

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    That's currently not possible due to a bug in wiki.create, which doesn't insert the multi-page template links.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  3. #3

    Default

    Is it planned to fix this bug?
    In which release?

  4. #4
    Join Date
    Aug 2007
    Posts
    143

    Default

    You could probably do this via the API using a scripting language.

  5. #5
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    You can track the wiki.create issue here.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  6. #6

    Default Simple Sample

    Hi,

    I've seen that you fixed the issue mentioned above. May you provide a small sample snippet for my original question, please?

    Best wishes

    Peter

  7. #7
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    It was solved by mimicking the way that templates are inserted manually. When wiki.create loads the new page with the template inserted, you'll notice a set of links that have been inserted that correspond to the child pages. These links are identified at save time and used to generate the additional pages. This way, the child pages are only created if the parent page was created. If the user cancels, no pages are created.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  8. #8

    Default

    Ok, I found out, why it is not working for me... I ran updateWiki.sh and now I have version r12588.

    Maybe this is a dumb question, but how do I get r12663 or newer, including the mentioned fix?

    I'm using the vm-image.

  9. #9
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    Once it is released, you'll be able to upgrade seamlessly.
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts