Tags:
create new tag
view all tags

TWiki Variables » Search » Category: UI& Visualization

ANCHORLINK{} -- add anchor to create a deep #anchor link

  • Add an anchor link to topic text, such as %ANCHORLINK{"AnchorExample"}%. When hovering over text where an anchor link has been added, a anchor-bg.gif icon will appear on the left side. Clicking on it will show the #AnchorExample in the browser URL bar for easy copy & paste. The %ANCHORLINK{}% variable is handled by the AnchorLinkPlugin.
  • Anchor links can be added to bullets, tables, etc, as in this example. %ANCHORLINK{"AnchorExample"}% However, they currently cannot be added to top level paragraphs. Anchor link IDs must be unique per page.
  • Anchor links are added automatically to headers by the AnchorLinkPlugin.
  • Syntax: %ANCHORLINK{"id"}%
  • Parameters:
    Parameter Description Default Example
    "id" Identifier (name) of the anchor. Use only: a-z, A-Z, 0-9, _, - (required) "Progress"
  • Example: %ANCHORLINK{"AnchorExample"}%
  • Expands to embedded HTML: <a name="AnchorExample"></a>, along with logic to show/hide the anchor link icon anchor-bg.gif
  • Category: LinkingAndNavigationVariables, UIAndVisualizationVariables
  • Related: AnchorLinkPlugin, TWikiVariables (this topic)

CHART{ attributes } -- create area, bar, line and scatter charts to visualize TWiki tables

CODE{"language"} -- highlight source code fragments for many languages

  • The %CODE{}% and %ENDCODE% variables are handled by the SyntaxHighlightingPlugin.
  • Syntax: %CODE{"language"}% ...code... %ENDCODE%
  • Parameters:
    Parameter Description Default
    "..." or
    lang="..."
    Source language. Supported languages: ada, asm, awk, bash, changelog, cpp, csh, c, delphi, diffs, diff, diffu, dylan, eiffel, elisp, Name:, forth, fortran_pp, fortran, haskell, html, icon, idl, inf, javascript, java, ksh, lua, m4, mail, makefile, matlab, nroff, oberon2, objc, outline, oz, pascal, perl, php, postscript, pyrex, python, rfc, ruby, scheme, sh, skill, Smalltalk, sml, sql, states, synopsys, tcl, tcsh, tex, vba, verilog, vhdl, vrml, wmlscript, zsh (none, required)
    num="..." Show line numbers next to the source code. An integer indicates the start number. Also "on" and "off" "off"
    step="..." Increment line numbers with the given step. Negative numbers will decrement. "1"
    style="..." Style of box around the source code light gray box
    numstyle="..." Style of line number column light brown box
  • Example:                   • Expands to:
    <sticky>
    %CODE{"cpp" num="on"}%
    void foo() {
      print("Do stuff.\n");
    }
    %ENDCODE%
    </sticky>
     
        1void foo() {
        2     print("Do stuff.\n");
        3   } 

    COLORPICKER{} -- color picker for use in HTML forms for TWiki applications

    • The %COLORPICKER{}% variable is handled by the ColorPickerPlugin.
    • Syntax: %COLORPICKER{ name="..." value="..." }%
    • Parameters:
      Parameter Description Default Example
      name Name of input field (required) name="text_color"
      value Initial color value, in hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). (none) value="#0000ff"
      size Size of input field, in number of characters (browser default) size="8"
      class CSS class of input field or the rectangular color block (none) class="twikiInputField"
      style Style of input field or the rectangular color block (none) style="width: 190px; height: 32px"
      type Type of color widget:
      "below" - color picker is located below the input field;
      "popup" - pop-up a color picker window when clicking the button next to the input field
          (this uses very little vertical space);
      "view" - a read-only rectangular block colored in the color value (no color picker);
      "view-hex" - like view, in addition shows the color value as an RGB hexadecimal code (no color picker);
      type="below" type="view-hex"
      Additional parameters can be supplied; they will be added to the HTML input field or the rectangular color block.
    • Example:
      <form action="...">
      %COLORPICKER{ name="text_color" value="#123456" class="twikiInputField" type="popup" }%
      <form>
      Renders as:
    • Category: ApplicationsAndComponentsVariables, DatabaseAndFormsVariables, EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: ColorPickerPlugin, TWikiForms (this topic)

    DASHBOARD -- build a dashboard with banner and boxes

    DATEPICKER{} -- pop-up calendar to select a date for use in HTML forms

    • The %DATEPICKER{}% variable is handled by the DatePickerPlugin.
    • Syntax: %DATEPICKER{ name="..." value="..." }%
    • Parameters:
      Parameter Description Default Example
      name Name of input field.
      φ: No output is shown if the name parameter is missing, but the CSS and Javascript are loaded.
      (requiredφ) name="Start"
      value Initial date value. "" (today) value="2012-12-31"
      format Format of resulting date value.
      %a - abbreviated weekday name
      %A - full weekday name
      %b - abbreviated month name
      %B - full month name
      %C - century number
      %d - the day of the month (00 ... 31)
      %e - the day of the month (0 ... 31)
      %H - hour (00 ... 23)
      %I - hour (01 ... 12)
      %j - day of the year ( 000 ... 366)
      %k - hour (0 ... 23)
      %l - hour (1 ... 12)
      %m - month (01 ... 12)
      %M - minute (00 ... 59)
      %n - a newline character
      %p - "PM" or "AM"
      %P - "pm" or "am"
      %S - second (00 ... 59)
      %s - number of seconds since Epoch (since Jan 01 1970 00:00:00 UTC)
      %t - a tab character
      %U, %W, %V - the week number. The week 01 is the week that has the Thursday in the current year, which is equivalent to the week that contains the fourth day of January. Weeks start on Monday.
      %u - the day of the week (1 ... 7, 1 = MON)
      %w - the day of the week (0 ... 6, 0 = SUN)
      %y - year without the century (00 ... 99)
      %Y - year including the century (ex. 2012)
      %% - a literal % character
      "%Y-%m-%d" format="%e %b %Y"
      id ID of input field, optional. "id_" + name id="idStart"
      size Size of input field, in number of characters. (calculated as needed) size="12"
      class CSS class of input field. "twikiInputField" class="dateField"
      Additional HTML input field attributes, such as alt, disabled, maxlength, onblur, onchange, onfocus, readonly, style, tabindex, title    
    • Example:
      <form action="...">
      %DATEPICKER{ name="Start_Date" }%
      <form>
    • Expands to:
    • Category: ApplicationsAndComponentsVariables, DatabaseAndFormsVariables, DateAndTimeVariables, EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: DatePickerPlugin, TWikiForms (this topic)

    DRAWING -- vector drawing editor and clickable maps for diagrams and workflows

    EXECUTE{ "script" } -- safely execute shell scripts or Perl code - use TWiki as the user interface for external applications

    FLOWCHART{} -- create a flowchart from topic text

    • The %FLOWCHART{}%, %FLOWCHART_START% and %FLOWCHART_STOP% variables are handled by the FlowchartPlugin.
    • Syntax: %FLOWCHART{}% ... %FLOWCHART_START% ... %FLOWCHART_STOP%
    • Parameters of %FLOWCHART{}%:
      Parameter Description
      item-w Width for the flowchart's itens area
      item-h Height for the flowchart's itens
      area-w Width of the area of the flowchart's itens
      area-h Height of the area of the flowchart's itens
      percent Percentage of the PNG size presented in relation to the standard of the generated SVG
      text-size Size in pixels of the font text
      tag-style Style for the img tag
    • Example:
      %FLOWCHART%
      %FLOWCHART_START%
      ---++ Flowchart Start
        * Type: Start
      ---++ Question 1
        * Type: Question
        * Yes: trunk1
        * No: trunk2
      ---++ Start of %FLOWCHART_BR% Trunk 1
        * Id: trunk1
        * Color: 70B070
      ---++ End of Trunk 1
        * Type: End
      ---++ Start of %FLOWCHART_BR% Trunk 2
        * Id: trunk2
        * Color: E0B040
      ---++ End of Trunk 2
        * Type: End
      %FLOWCHART_STOP%
    • Category: FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: FlowchartPlugin, FlowchartPluginExample (this topic)

    GAUGE{ attributes } -- create graphical images of gauges, typically used for dashboards

    • The %GAUGE{}% variable is handled by the GaugePlugin.
    • Syntax: %GAUGE{ type="..." name="..." value="..." }%
    • Supported attributes:
      Attribute Comment Default
      type The type of gauge, type="tambar" for target measure bar, or type="trend" for trend icon Global TYPE setting
      name Name to uniquely identify the gauge file that is auto-created. None; required for tambar
      value For tambar: The actual value of the gauge
      For trend: Positive = arrow up, 0 = arrow right, negative = arrow down
      None. Show "no data" if missing
      alt Alternate text for image Value is value parameter
      width Defines the width of the gauge in pixels. Global <type>_WIDTH setting
      height Defines the height of the gauge in pixels. Global <type>_HEIGHT setting
      scale For tambar: Defines the number and position of the scales. For example a value of "5, 12, 35, 57" denotes that there are three regions on the bar gauge, "5...12", "12...35" and "35...57".
      For trend: N/A
      Global <type>_SCALE setting
      colors For tambar: List of colors, each region has two colors. For trend: N/A Global <type>_COLORS setting
    • Examples:
      • %GAUGE{ type="tambar" name="t1" scale="0, 10, 20, 40" value="27" }% shows 27
      • %GAUGE{ type="trend" name="t2" value="-3" }% shows down trend
    • Category: ChartingAndDrawingVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: GaugePlugin, GaugePluginTests (this topic)

    HIERARCHICALSELECT{ attributes } -- display hierarchical multi-level drop-down menus

    • The %HIERARCHICALSELECT{}% variable is handled by the HierarchicalSelectPlugin.
    • Syntax: %HIERARCHICALSELECT{ topic="MenuDefinition" ... }%
    • Parameters:
      Parameter Description Default
      topic Topic from which to read the menu definition (required)
      web Web from which to read the menu definition current web
      key String to use as the basis for naming of HTML form elements Derived from menu topic
      level If specified, select a menu level (integer starting from 0) to display All levels
      parse_keywords Flag: Nonzero sets parsing mode where first word of menu line is return-value keyword, remainder is text to display Entire line used as both return value and display text
    • Example with three levels:
      %HIERARCHICALSELECT{ web="TWiki" topic="HierarchicalSelectPluginExample" level="0" names="country,subdivision,region" }%
      %HIERARCHICALSELECT{ web="TWiki" topic="HierarchicalSelectPluginExample" level="1" }%
      %HIERARCHICALSELECT{ web="TWiki" topic="HierarchicalSelectPluginExample" level="2" }%
    • Category: DatabaseAndFormsVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: HierarchicalSelectPlugin, HierarchicalSelectPluginExample, TWikiTemplates (this topic)

    PERCENTCOMPLETE{} -- percent complete selector for use in HTML forms

    QRCODE -- create QR Code (a matrix barcode) in TWiki pages

    • QR Code example The %QRCODE{}% variable is handled by the QRCodePlugin
    • Syntax: %QRCODE{ "..." ... }%
    • Parameter "..." - text to encode as QR Code.
    • Parameter ecc="..." - error Correction Capability. Valid values "L", "M", "Q", "H". Default "M".
    • Parameter version="..." - symbol version of QR Code, or size of matrix. Valid values "1" ... "40", and "auto" for automatic versioning. Default "8".
    • Parameter size="..." - module size, e.g. pixel size of a block (bit) that makes up the matrix of the barcode. Default "4".
    • Parameter format="..." - format of HTML img tag of generated QR Code image. Supported variables: $urlpath - URL path of image, $width - image width, $height - image height. Default: "<img src='$urlpath' width='$width' height='$height' border='0' alt='' />".
    • Example: %QRCODE{ "http://twiki.org/" version="2" size="3" }% returns above QR Code.
    • Category: ExportAndPublishingVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: QRCodePlugin (this topic)

    RENDERFORM -- render TWiki Forms data within a topic

    • The %RENDERLIST% variable is handled by the RenderFormPlugin.
    • Syntax: %RENDERFORM{ "ATWikiFormDefinition" }%
    • Parameters:
      Parameter Description Default / Example
      dateformat overwrites the JSCALENDARDATEFORMAT preference for date fields dateformat="%d %b %Y"
      donotnotify disables notifications undefined / donotnotify="on"
      form (required attribute) a name of a topic with a TWikiForms definition undefined / form="MyTestForm"
      hidden a comma separated list of form field names to hide in all modes undefined / hidden="Field1,Field2"
      hideheader if set, disables the form header hideheader="no"
      layout a topic with a layout (see Form Layout section); syntax: layout="<topic>#<layout name>"; if layout name is omitted a default layout will be taken undefined / layout="TestFormLayout#test1"
      mode render mode of the form, allowed values: create (default), edit, view (default if topic exists) mode="create"
      onlynewtopic disables overwrite of existing topics onlynewtopic="on"
      onlywikiname disallows the usage of non-TWiki.WikiWords for topic names onlywikiname="on"
      order changes the display order of form fields; order value is a comma separated list of field names; if the order list is incomplete all missing and unhidden form fields will be added; there are special values for order: [:alpha:], [:dalpha:], [:num:] and [:dnum:], e.g. order="[:alpha:]" to sort all fields alphanumerical undefined / order="Field1, Field2"
      script changes the behavior of edit/create modes; allowed values: save - saves the form data; edit - edit the resulting topic script="save"
      template a template name for predefined attributes undefined / template="helpdesk"
      templatetopic a template topic; useful for the create mode undefined / templatetopic="MyHelpDeskTopicTemplate"
      text the topic text; text will be ignored if a templatetopic is defined undefined / text="my small topic text"
      topic an existing topic for edit and view mode or a topic template name for a new topic (create mode) (e.g. TestFormDataXXXXXXXXXX) topic="%TOPIC%XXXXXXXXXX" / topic="TestFormData%SERVERTIME{$epoch}%"
      topicparent a topic parent; useful for the create mode; if undefined the form topic will be used topicparent="%WEB%.%TOPIC%" / topicparent="MyHelpDesk"
    • Example: %RENDERLIST{ "IT.HelpDeskForm" }%
    • Category: ApplicationsAndComponentsVariables, DatabaseAndFormsVariables, EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
    • Related: RenderFormPlugin, TWikiForms (this topic)

    SLIDESHOWEND -- end slideshow

    SLIDESHOWSTART -- convert a topic with headings into a slideshow

    Total: 16 variables

    Related Topics: TWikiVariables, TWikiVariablesSearch, TWikiVariablesQuickStart

Topic revision: r1 - 2012-11-11 - TWikiContributor
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.