CheckToIncludePlugin

Syntax Rules

Use the CINCLUDE tag to include information from another TWiki page, only if a checkbox is checked. The first argument, ID, is the name of the page to include. The second argument, LABEL, is optional. Use it to describe the text.

Use the ASK and CHECK tags to include a section of text, if a checkbox is checked. The ASK tag creates the checkbox. It takes two agruments, the ID of the text to display and a LABEL to display beside the checkbox. The CHECK tag creates the section of text to display. It requires a start and end tag, and also takes the ID of the text to display as its argument. The actual text to display should be enclosed within the start and end tags. All arguments are optional.

Examples

You type:
%CINCLUDE{topic="Main.WebHome", label="our home page"}%

You get:

Click here to include text: 

You type:
%ASK{}%
%CHECK{}%
You clicked on the checkbox!
%ENDCHECK%

You get:
Click here to include text:

You type:
%ASK{id="time", label="Check the time?"}%
%CHECK{"time"}%
%SERVERTIME{}%
%ENDCHECK%

You get:
Click here to include text:

CheckToIncludePlugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, for example, %CHECKTOINCLUDEPLUGIN_SHORTDESCRIPTION%

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = This plugin displays a checkbox which, when checked, displays the content of another TWiki page.

  • Allow deprecated %INCLUDE:"TopicName"% syntax:
    • Set OLDINCLUDE = 1

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Plugin Info

Plugin Author: ColeBeck
Plugin Version: 27 Jul 2005
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.0
Plugin Home: http://biostat.mc.vanderbilt.edu/twiki/bin/view/TWiki/CheckToIncludePlugin
Feedback: none

Related Topics: DefaultPreferences, Plugins
Edit | Attach | Print version | History: r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r3 - 02 Aug 2005, ColeBeck
 

This site is powered by FoswikiCopyright © 2013-2020 by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback