TWiki Variables » Search » Category: Workflow & Automation

COMMENT{ attributes } -- insert an edit box into the topic to easily add comments.

  • A %COMMENT% without parameters shows a simple text box.
  • A %COMMENT{}% can handle the following parameters:
    Parameter Description Default
    type This is the name of the template to use for this comment. Comment templates are defined in a TWiki template - see customization. If this attribute is not defined, the type is whatever is defined by COMMENTPLUGIN_DEFAULT_TYPE, either in this topic or in your WebPreferences. "below"
    default Default text to put into the textarea of the prompt.  
    target Name of the topic to add the comment to the current topic
    location Regular expression specifying the comment location in the target topic. Read carefully the CommentPlugin documentation!  
    mode For compatibility with older versions only, synonymous with type  
    nonotify Set to "on" to disable change notification for target topics "off"
    noform Set to "on" to disable the automatic form that encloses your comment block - remember to insert <form> tags yourself! See CommentPluginExamples for an example. "off"
    nopost Set to "on" to disable insertion of the posted text into the topic. "off"
    remove Set to "on" to remove the comment prompt after the first time it is clicked. "off"
    button Button label text "Add comment"
    emailto Send comment by email. Use comma "," to seperate multiple email addresses. This feature is disabled by default. To enable this feature, please set up "$TWiki::cfg{Plugins}{CommentPlugin}{EmailEnabled} = 1;".  

ENDSECTION{"name"} -- marks the end of a named section within a topic

  • Syntax: %ENDSECTION{"name"}%
  • Syntax: %ENDSECTION{type="include"}%
  • Syntax: %ENDSECTION{type="templateonly"}%
  • Syntax: %ENDSECTION{type="expandvariables"}%
  • Supported parameter:
    Parameter: Description:
    "name" Name of the section.
    type="..." Type of the section being terminated; supported types "section", "include", "templateonly", "expandvariables"
  • If the STARTSECTION is named, the corresponding ENDSECTION must also be named with the same name. If the STARTSECTION specifies a type, then the corresponding ENDSECTION must also specify the same type. If the section is unnamed, ENDSECTION will match with the nearest unnamed %STARTSECTION% of the same type above it.
  • Category: DevelopmentVariables, WorkflowAndAutomationVariables
  • Related: ENDSECTION, INCLUDE, STARTINCLUDE, STARTSECTION, STOPINCLUDE (this topic)

IF{"condition" ...} -- simple conditionals

SENDMAIL{...} -- send e-mail from actions in TWiki topics, useful for workflow automation

  • The %SENDMAIL{}% variable is handled by the SendMailPlugin.
  • Syntax: %SENDMAIL{ action="send" ... }%
  • Parameters:
    Parameter Description Default
    action="" Only action="send" is supported, it will send an e-mail "" (no action)
    excludetopic="MyTemplate" Exclude action for named topic. Typically used in a template topic containing the SENDMAL variable to disable the action when viewing the topic. "" (no exclude)
    from="admin@example.com" E-mail address or WikiName of sender. If a WikiName is specified, the registered e-mail of that person is used. Supported tokens:
    $webmastername - name of TWiki administrator.
    $webmasteremail - e-mail of TWiki administrator.
    $username - WikiName of logged in user.
    $useremail - e-mail address of the logged in user.
    Defaults to TWiki administrator. See note on open mail relay.
    "$webmastername <$webmasteremail>"
    to="jom@example.com" To list: Comma-space delimited list of e-mail addresses or WikiNames of adressees. Same tokens supported as in from="". Defaults to TWiki administrator. "$webmastername <$webmasteremail>"
    cc="jimmy@example.com" CC list: Comma-space delimited list of e-mails or WikiNames. Same tokens supported as in from="". ""
    bcc="boss@example.com" BCC list: Comma-space delimited list of e-mails or WikiNames. Same tokens supported as in from="". ""
    subject="Any text" E-mail subject. Text may include TWikiVariables such as %URLPARAM{subject}%, and format tokens such as $n and $percnt. (help message)
    text="Any text" or
    plaintext="Any text"
    E-mail body in plain text format. Text may include TWikiVariables and format tokens. (help message)
    htmltext="Any HTML" E-mail body in HTML format, optional. Text may include TWikiVariables and format tokens. Double quotes need to be escaped, such as <a href=\"http://twiki.org/\">TWiki.org<a>. A MIME Multi-Part message is sent if both, plaintext and htmltext are specified. ""
    onsuccess="..." Text shown in place of the SENDMAIL variable on success, default is empty. Text may include TWikiVariables and format tokens. ""
    onerror="| $error ||" Error message shown in place of the SENDMAIL variable on error, if any. Text may include TWikiVariables and format tokens. Token $error expands to the error message. "$error"
  • Security: See note on how to avoid an open mail relay
  • Example:
    %SENDMAIL{ action="send" to="$username <$useremail>" subject="Status change" text="Status changed to %FORMFIELD{Status}%" }%
  • Category: DevelopmentVariables, EmailAndNotificationVariables, WorkflowAndAutomationVariables
  • Related: SendMailPlugin (this topic)

STARTINCLUDE -- start position of topic text if included

STARTSECTION -- marks the start of a section within a topic

  • Section boundaries are defined with %STARTSECTION{}% and %ENDSECTION{}%.
  • Sections may be given a name to help identify them, and/or a type, which changes how they are used.
    • type="section" - the default, used for a generic section, such as a named section used by INCLUDE.
    • type="include" - like %STARTINCLUDE% ... %STOPINCLUDE% except that you can have as many include blocks as you want (%STARTINCLUDE% is restricted to only one).
    • type="templateonly" - start position of text to be removed when a template topic is used. Use this to embed text that you do not want expanded when a new topic based on the template topic is created. TWikiTemplates has more.
    • type="expandvariables" - start position where TWikiVariables get expanded when a new topic is created. As documented in TWikiTemplates, only certain variables get expanded when a new topic based on the template topic is created. All variables get expanded within a "expandvariables" section.
  • Syntax: %STARTSECTION{"name"}% ................... %ENDSECTION{"name"}%
  • Syntax: %STARTSECTION{type="include"}% ........... %ENDSECTION{type="include"}%
  • Syntax: %STARTSECTION{type="templateonly"}% ...... %ENDSECTION{type="templateonly"}%
  • Syntax: %STARTSECTION{type="expandvariables"}% ... %ENDSECTION{type="expandvariables"}%
  • Supported parameters:
    Parameter: Description: Default
    "name" Name of the section. Must be unique inside a topic. Generated name
    type="..." Type of the section; type "section", "include", "templateonly", or "expandvariables" "section"
    disablefixlinks="on" Only for named sections: Bypass fixing WikiWord links if section is included from a topic in another web. Fixing links in included text such as from SomeLink to Thisweb.SomeLink is usually desirable so that links in included text still point to the same target. fix links
  • ALERT! Note: If a section is not given a name, it will be assigned one. Unnamed sections are assigned names starting with _SECTION0 for the first unnamed section in the topic, _SECTION1 for the second, etc..
  • ALERT! Note: You can define nested sections. Do not overlap sections. Use named sections to make sure that the correct START and ENDs are matched. Section markers are not displayed when a topic is viewed.
  • Category: DevelopmentVariables, WorkflowAndAutomationVariables
  • Related: ENDSECTION, HIDE, INCLUDE, NOP, STARTINCLUDE, STOPINCLUDE (this topic)

Total: 6 variables

Related Topics: TWikiVariables, TWikiVariablesSearch, TWikiVariablesQuickStart

Topic revision: r1 - 11 Nov 2012 - TWikiContributor
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.WorkflowAndAutomationVariables.