TWiki Variables » Search » Category: Formatting & Rendering

BUBBLESIG -- show bubble box and user signature with profile picture icon

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

COPY -- Copyright symbol

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" }%
  • Expands to:
  • Category: ApplicationsAndComponentsVariables, DatabaseAndFormsVariables, DateAndTimeVariables, EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UIAndVisualizationVariables
  • Related: DatePickerPlugin, TWikiForms (this topic)

ENTITY{string} -- encode a string to HTML entities

  • Encode "special" characters to HTML entities. Useful to encode text properly for HTML input fields.
  • Encoded characters:
    • all non-printable ASCII characters below space, including newline ("\n") and linefeed ("\r")
    • Space
    • HTML special characters "<", ">", "&", single quote (') and double quote (")
    • TWiki special characters "%", "[", "]", "@", "_", "*", "=" and "|"
  • Syntax: %ENTITY{string}%
  • Example: %ENTITY{text with "quotes" and
    expands to text&#32;with&#32;&#34;quotes&#34;&#32;and&#10;newline
  • Notes:
    • To protect against cross-site scripting (XSS), always entity encode text intended for HTML input fields. This is especially true if text is received dynamically via URLPARAM or the like.
      Example: <input type="text" name="address" value="%ENTITY{any text}%" />
    • %ENTITY{string}% is roughly equivalent to %ENCODE{ "string" type="html" }%, but the latter cannot handle strings that have double quotes embedded in it.
  • Category: DevelopmentVariables, FormattingAndRenderingVariables, ExportAndPublishingVariables

HIDEINPRINT{text} -- hide content when printing

JQENDTAB -- end a JQuery tab within a tab pane

JQENDTABPANE -- end a JQuery tab pane

JQTAB -- start a JQuery tab within a tab pane

JQTABPANE -- start a JQuery tab pane

  • Create nice looking horizontal tab panes in TWiki topics. Write a sequence of %JQTAB{"..."}% and %JQENDTAB% pairs, and enclose them in %JQTABPANE% and %JQENDTABPANE%. Tab panes can be nested, e.g. within one tab you can add another tab pane. These variable are handled by the JQueryPlugin.
  • Syntax: %JQTABPANE% %JQTAB{"Tab 1}% ... %JQENDTAB% %JQTAB{"Tab 2}% ... %JQENDTAB% ... %JQENDTABPANE%
  • Example:
    %JQTAB{"Tab 1"}%
    Tab 1 content...
    %JQTAB{"Tab 2"}%
    Tab 2 content...
  • Category: ApplicationsAndComponentsVariables, FormattingAndRenderingVariables
  • Related: JQENDTAB, JQENDTABPANE, JQTAB, JQueryPlugin (this topic)

LAQUO -- left double angle quote

NBSP -- non-breaking space

PARENTBC -- parent breadcrumbs for headings

RAQUO -- right double angle quote

REG -- Registered Trademark symbol

RENDERLIST -- render bullet lists in a variety of formats

  • The %RENDERLIST% variable is handled by the RenderListPlugin
  • Syntax: %RENDERLIST%
  • Syntax: %RENDERLIST{ "org" focus="Sales.WestCoastTeam" }%
  • Example:
    %RENDERLIST{ "org" }%
       * [[Eng.WebHome][Engineering]]
          * [[Eng.TechPubs][Tech Pubs]]
       * [[Sales.WestCoastTeam][Sales]]
          * [[Sales.EastCoastTeam][East Coast]]
          * [[Sales.WestCoastTeam][West Coast]]
  • Category: FormattingAndRenderingVariables
  • Related: RenderListPlugin (this topic)

SLIDESHOWEND -- end slideshow

SLIDESHOWSTART -- convert a topic with headings into a slideshow

TABLE{ attributes } -- control attributes of tables and sorting of table columns

  • The %TABLE{}% variable is handled by the TablePlugin
  • Syntax: %TABLE{ attributes }%

  • Supported attributes:
    Argument Comment Default value Example
    sort Set table sorting by clicking headers "on" or "off". unspecified sort="on"
    initsort Column to sort initially ("1" to number of columns). unspecified initsort="2"
    initdirection Initial sorting direction for initsort, set to "up" (descending) or "down" (ascending). unspecified initdirection="up"
    disableallsort Disable all sorting, both initsort and header sort. This is mainly used by plugins such as the EditTablePlugin to disable sorting in a table while editing the table. unspecified disableallsort="on"
    headerbg Header cell background colour. "#6b7f93" headerbg="#999999"
    headerbgsorted Header cell background colour of a sorted column. the value of headerbg headerbgsorted="#32596c"
    headercolor Header cell text colour. "#ffffff" headercolor="#0000cc"
    databg Data cell background colour, a comma separated list. Specify "none" for no colour, that is to use the colour/background of the page the table is on. "#edf4f9,#ffffff" databg="#f2f2f2,#ffffff"
    databgsorted Data cell background colour of a sorted column; see databg. the values of databg databgsorted="#d4e8e4,#e5f5ea"
    datacolor Data cell text colour, a comma separated list. unspecified datacolor="#0000CC, #000000"
    tableborder Table border width (pixels). "1" tableborder="2"
    tableframe Table frame, set to "void" (no sides), "above" (the top side only), "below" (the bottom side only), "hsides" (the top and bottom sides only), "lhs" (the left-hand side only), "rhs" (the right-hand side only), "vsides" (the right and left sides only), "box" (all four sides), "border" (all four sides). unspecified tableframe="hsides"
    tablerules Table rules, set to "none" (no rules), "groups" (rules will appear between row groups and column groups only), "rows" (rules will appear between rows only), "cols" (rules will appear between columns only), "all" (rules will appear between all rows and columns). unspecified tablerules="rows"
    cellpadding Cell padding (pixels). "0" cellpadding="0"
    cellspacing Cell spacing (pixels). "0" cellspacing="3"
    cellborder Cell border width (pixels). unspecified cellborder="0"
    valign Vertical alignment of cells and headers, set to "top", "middle", "bottom" or "baseline". unspecified valign="top"
    headervalign Vertical alignment of header cells; overrides valign. unspecified headervalign="top"
    datavalign Vertical alignment of data cells; overrides valign. unspecified datavalign="top"
    headeralign Header cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to "left", "center", "right" or "justify". Overrides individual cell settings. unspecified headeralign="left,right"
    dataalign Data cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to "left", "center", "right" or "justify". Overrides individual cell settings. unspecified dataalign="center"
    tablewidth Table width: Percentage of window width, or absolute pixel value. unspecified tablewidth="100%"
    columnwidths Column widths: Comma delimited list of column widths, percentage or absolute pixel value. unspecified columnwidths="80%,20%"
    headerrows Number of header rows to exclude from sort. (will be rendered in a HTML thead section) "1" headerrows="1"
    footerrows Number of footer rows to exclude from sort. (will be rendered in a HTML tfoot section) "0" footerrows="1"
    id Unique table identifier string, used for targeting a table with CSS. tableN (where N is the table order number on the page) id="userTable"
    summary Table summary used by screenreaders: A summary of what the table presents. It should provide an orientation for someone who listens to the table. unspecified summary="List of subscribed users"
    caption Table caption: A title that will be displayed just above the table. unspecified caption="Users"

TM -- Trademark symbol

TWISTY{ attributes } -- dynamically open and close sections of content

USERSIG -- show user signature with profile picture icon

WIP -- work in progress icon

Total: 24 variables


Related Topics: TWikiVariables, TWikiVariablesSearch, TWikiVariablesQuickStart

Topic revision: r1 - 2012-11-11 - TWikiContributor
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2019 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 at TWiki:TWiki.FormattingAndRenderingVariables.