wiki.Create(label : str?, path : str?, template : str?, button : bool?, title : str?) : xml
Insert a link or button to create a new page.
1.9.1 or later; 8.05.1 or later args parameter added
| Name | Type | Description |
| label | str | (optional, default:"New Page") label for edit link or button |
| path | str | (optional, default: current page) path to parent page for new page |
| template | str | (optional, default: system default) template to use to populate new page |
| button | bool | (optional, default: true) show as button |
| title | str | (optional, default: "Page Title") title of page; a number will be placed next to title if it already exists in path (e.g. "Page Title 2") |
| args | map | (optional, default: nil) request arguments to pass to new page (8.05.1 or later) |
creates a link to a new page
| Output | ||
|
| |
|
|
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
http://wiki.opengarden.org/MindTouch_Deki/FAQ/Page_Management/How_do_I...Create_automated_pages%3f edited 03:44, 11 Jun 2008
args map (optional, default: nil) request arguments to pass to new page (8.05.1 or later)
This looks intriguing but I'm not really sure what I can send to it.
{{ wiki.create( label: "Create Progress Report", template: "PMS/Project_Home_Page", title: page.title" - Progress Report" ) }}
{{ wiki.create( label: "Create Progress Report", template: "PMS/Project_Home_Page", title: page.title .. " - Progress Report" ) }}
Gives error:
")" expected: p[2]/span, line 1, column 19 (click for details)
Callstack:
at Template:PMS/Project_Home_Page
MindTouch.Deki.Script.Compiler.DekiScriptParserException: ")" expected: p[2]/span, line 1, column 19
at MindTouch.Deki.Script.Compiler.Errors.SynErr (System.String origin, Int32 line, Int32 col, Int32 n) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.SynErr (Int32 n) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.Expect (Int32 n) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.ArgList (MindTouch.Deki.Script.Expr.Location& location, MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.Primary (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.Unary (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.MulExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.AddExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.ConcatExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.RelExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.EqlExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.AndExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.OrExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.NullCoalescingExpr (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.TernaryExpression (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.Expression (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.Statements (MindTouch.Deki.Script.Expr.DekiScriptExpression& expr) [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.DekiScript () [0x00000]
at MindTouch.Deki.Script.Compiler.Parser.Parse () [0x00000]
at MindTouch.Deki.Script.Compiler.DekiScriptParser.Parse (Location location, System.String source) [0x00000]
at MindTouch.Deki.Script.DekiScriptInterpreter.Evaluate (MindTouch.Xml.XDoc script, System.Xml.XmlElement node, MindTouch.Deki.Script.DekiScriptEvalContext context, MindTouch.Deki.Script.Runtime.DekiScriptEnv env, MindTouch.Deki.Script.DekiScriptRuntime runtime, System.Boolean& scripted, System.Boolean& error) [0x00000]
-----------------------
Out of interest, how do I know which part of the expression 'column 19' is? It would help my troubleshooting..