|
TWiki CGI and Command Line Scripts |
|
|
|
< < |
topicparent |
The parent topic of the new user homepage |
{UsersTopicName} configure setting |
|
> > |
topicparent |
The parent topic of the new user profile page |
{UsersTopicName} configure setting |
|
|
Note: The register script can only be called via http POST method, not GET. Make sure to specify the "post" method if you call the register script via a form action. |
|
filecomment |
Comment to associate with file in attachment table |
|
createlink |
if defined, will create a link to file at end of topic |
|
changeproperties |
if defined, this is a property change operation only - no file will be uploaded. |
null |
|
|
> > |
updatefield |
If defined and if the value matches the name of a form field, it will update that form field with the name of the uploaded file. |
|
|
|
You can use a tool like curl to upload files from the command line using this script. |
|
contenttype |
Allows you to specify a different Content-Type: (e.g. contenttype=text/plain ) |
|
rev |
Revision to view (e.g. rev=45 ) |
|
template |
Allows you to specify a different skin template, overriding the 'view' template the view script would normally use. The default template is view . For example, you could specify /twikipublic/view/TWiki/TWikiScripts?template=edit. This is mainly useful when you have specialised templates for a TWiki Application. |
|
|
|
< < |
topic |
redirects (at the beging of the cgi script running) to show the spcified Web.Topic, or, redirects to a URL, if allowed by {AllowRedirectUrl} and {PermittedRedirectHostUrls} configure settings |
|
|
> > |
topic |
redirects to show the specified Web.Topic, or, redirects to a URL, if allowed by {AllowRedirectUrl} and {PermittedRedirectHostUrls} configure settings |
|
createifnotexist |
If createifnotexist is set to 1 and in case the topic does not exist, it is created automatically on view. Useful to create topics automatically based on a specific template (see example below). Behind the scene, the view script redirects first to the save script, passing along all URL parameters. Thus all URL parameters of the save script can be used, such as templatetopic , topicparent and redirectto . Next, the save script creates the topic and redirects back to the view script (or displays an error in case there were any issues creating the topic). |
|
|
| |
|
< < | For historical reasons, the view script has a special interpretation of the text skin. In earlier TWiki versions the skin=text parameter was used like this: |
> > | Example use of createifnotexist to link to the bookmark page of a user, and to create the page on the fly if needed:
[[%SCRIPTURL{view}%/%USERSWEB%/%WIKINAME%Bookmarks?createifnotexist=1&templatetopic=%SYSTEMWEB%.UserBookmarksTemplate&topicparent=%WIKINAME%][Bookmarks]]
For historical reasons, the view script has a special interpretation of the text skin. In earlier TWiki versions the skin=text parameter was used like this: |
| http://.../view/MyWeb/MyTopic?skin=text&contenttype=text/plain&raw=on
which shows the topic as plain text; useful for those who want to download plain text for the topic.
Using skin=text this way is DEPRECATED, use raw=text instead. |
|
Related Topics: AdminDocumentationCategory, DeveloperDocumentationCategory |
|
< < | -- Contributors: TWiki:Main/ArthurClemens , TWiki:Main/CrawfordCurrie , TWiki:Main/MichaelDaum , TWiki:Main/PeterThoeny , TWiki:Main/RafaelAlvarez , TWiki:Main/SvenDowideit , TWiki:Main/ThomasWeigert , TWiki:Main/WillNorris |
> > | -- Contributors: TWiki:Main.ArthurClemens , TWiki:Main.CrawfordCurrie , TWiki:Main.MichaelDaum , TWiki:Main.PeterThoeny , TWiki:Main.RafaelAlvarez , TWiki:Main.SvenDowideit , TWiki:Main.ThomasWeigert , TWiki:Main.WillNorris |