|
TWiki CGI and Command Line Scripts |
|
Command-line |
|
< < | You must be have the twiki/bin directory on the perl path to run the scripts from the command line. To avoid issues with file permissions, run the scripts as the web server user such as nobody or www . |
> > | You must have the twiki/bin directory on the perl path to run the scripts from the command line. To avoid issues with file permissions, run the scripts as the web server user such as nobody or www . |
|
Parameters are passed on the command line using '-name' - for example, |
|
contenttype |
Optional parameter that defines the application type to write into the CGI header. Defaults to text/html . May be used to invoke alternative client applications |
|
anyname |
Any parameter can passed to the new topic; if the template topic contains %URLPARAM{"anyname"}% , it will be replaced by its value |
|
breaklock |
If set, any lease conflicts will be ignored, and the edit will proceed even if someone is already editing the topic. |
|
|
|
< < |
redirectto |
If the user continues from edit to save, and if the save (or cancels the edit) process is successful, save will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Miscellaneous {AllowRedirectUrl} ). |
|
|
> > |
redirectto |
If the user continues from edit to save, and if the save (or cancels the edit) process is successful, save will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Security setup > Miscellaneous {AllowRedirectUrl} ). |
|
|
|
t |
Provide a unique URL each time a topic is edited, typically specifying parameter t=%SERVERTIME{$epoch}% in an edit link. This is done to prevent browsers from caching an edit session, which could result in editing outdated content. The parameter name and value is arbitrary, but must be unique each time. |
|
Form field values are passed in parameters named 'field' - for example, if I have a field Status the parameter name is Status . |
|
|
|
< < |
redirectto |
If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Miscellaneous {AllowRedirectUrl} ). |
|
> > |
redirectto |
If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Security setup > Miscellaneous {AllowRedirectUrl} ). |
|
| All other parameters may be interpreted as form fields, depending on the current form definition in the topic.
action=bulkRegister |
|
confirm |
if defined, requires a second level of confirmation |
|
currentwebonly |
if defined, searches current web only for links to this topic |
|
nonwikiword |
if defined, a non-wikiword is acceptable for the new topic name |
|
|
|
< < |
redirectto |
If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Miscellaneous {AllowRedirectUrl} ). |
|
|
> > |
redirectto |
If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Security setup > Miscellaneous {AllowRedirectUrl} ). |
|
|
|
Note: The rename script can only be called via http POST method, not GET. Make sure you specify method="post" if you call the rename script via a form action. |
|
originalrev |
Revision on which the edit started. |
|
edit |
The script to use to edit the topic when action is checkpoint |
edit |
editparams |
The parameter string to use to edit the topic |
|
|
|
< < |
redirectto |
The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Miscellaneous {AllowRedirectUrl} ). |
view topic being edited |
|
> > |
redirectto |
The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a TopicName , a Web.TopicName , or a URL. Note: Redirect to a URL only works if it is enabled in configure (Security setup > Miscellaneous {AllowRedirectUrl} ). |
view topic being edited |
|
|
Any errors will cause a redirect to an oops page. |