(These instructions are from an OpenGarden.org forum posting by SteveB.)
Version: 8.05 and higher
The following will embed a button that will create a new page for you with a specified template. The benefit of this approach is that you can embed several different buttons to suit your needs instead of being limited that whatever pre-defined template type the parent page happens to have had.
{{wiki.create("Add product", _, "Product_Information")}}
Wiki.Create now takes an optional title parameter. Since the purpose of wiki.create is to a create page, it will check if a page already exists with the proposed title and then append a number until a non-existing page title is found.
For example:
{{ wiki.create( path: "somewhere", template: "something", title: "My Page" ) }}
Might result in a new page being opened with title "My Page (3)" if "My Page", "My Page (1)", and "My Page (2)" already exist.
If you want to open the editor regardless if the page exists or not, use Wiki.Edit instead.
The path can point to anywhere you like in the hiearchy, even to a page that doesn't yet exist. If the sub-page doesn't already exist, one is automatically created.
To create a relative path, you'll need a bit of dekiscript magic, like this:
{{ wiki.create{ path: page.path .. '/sub-page/sub-sub-page', template: "something", title: "My Page" } }}
To create a page with a date prefix (for example for Meetings pages that sort by date) you could do something like this:
Click the New Page button below to create a new Meeting Minutes page using the Template:Meeting {{ wiki.create{template: "Meeting", title: string.eval{code: "date.year(date.now)"}.."."..string.eval{code: "date.month(date.now)"}.."."..string.eval{code: "date.day(date.now)"}.." XYZ Team Meeting Minutes" } }}