Tags:
create new tag
, view all tags

TopicVarsPlugin TWiki Plugin

This plugin will allow you to create variables in arbitrary topic pages, and not just WebPreferences. You can then refer to those variables from any topic within the same Web or Wiki, and pass in parameters to those vars to make them appear in URLPARAM. This allows you to build TWiki:Codev.TWikiApplication by bundling sets of directives on a page and then using them from elsewhere.

(Perhaps a future iteration will support Interwiki references, but that's probably not likely, unless we use XML-RPC or something to cut down the overhead of getting those values from afar.)

Syntax Rules

  • Set a variable:
    * Set VARIABLE_NAME = "some value"

  • Use a variable in the same Web:
    %TopicName.VARIABLE_NAME%

  • Use a variable from a different Web:
    %Webname.TopicName.VARIABLE_NAME%

(setting values is done just like in WebPreferences; with six preceding spaces, an asterisk, and so on).

TopicVarsPlugin Settings

  • One line description, is shown in the TextFormattingRules topic
    • Set SHORTDESCRIPTION = Set variables in arbitrary topics and refer to them from other topics within the same web; these can be parameterised thus facilitating the packaging of TWiki applications

Plugin Installation Instructions

  • Download the ZIP file from the Plugin web (see below)
  • Unzip TopicVarsPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/TopicVarsPlugin.txt Plugin topic
    lib/TWiki/Plugins/TopicVarsPlugin.pm Plugin Perl module
  • Check this topic here if the installation was successful
  • Test if the plugin is correctly installed:
    • Set THE_ANSWER = 42
    • You should see the answer here: [42] (%THE_ANSWER%)
    • and here: [%TopicVarsPlugin.THE_ANSWER%] (%TopicVarsPlugin.THE_ANSWER%)
    • and here: [%TWiki.TopicVarsPlugin.THE_ANSWER%] (%TWiki.TopicVarsPlugin.THE_ANSWER%)

Plugin Info

Plugin Author: TrippLilley
Plugin Version: 23 Jul 2003
Change History: 15 Nov 2001: Initial version
23 Jul 2003: Update to incorporate debug log undefined variable patch
11 Apr 2004: Update to allow parameters to define URLPARAM space
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.0
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/TopicVarsPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TopicVarsPluginDev

Related Topics: InterwikiPlugin

-- TrippLilley - 15 Nov 2001

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatbz2 TopicVarsPlugin-0.0.16417b.tar.bz2 r1 manage 3.9 K 2008-04-30 - 16:56 AndrewPantyukhin Slightly tweaked 20030806-1559. Works with 4.2.
Compressed Zip archivezip TopicVarsPlugin-20030806-1559.zip r1 manage 4.3 K 2003-08-06 - 20:01 TrippLilley TopicVarsPlugin distribution
Unknown file formatmd5 TopicVarsPlugin.md5 r2 r1 manage 0.2 K 2008-12-12 - 12:45 SopanShewale checksum file , Uploaded as a part of Release Process
Compressed Zip archivetgz TopicVarsPlugin.tgz r2 r1 manage 4.4 K 2008-12-12 - 12:45 SopanShewale See TopicVarsPlugin for details. Untar and run the installer script, Uploaded as a part of Release Process
Compressed Zip archivezip TopicVarsPlugin.zip r3 r2 r1 manage 5.7 K 2008-12-12 - 12:45 SopanShewale See TopicVarsPlugin for details. Unzip and run the installer script , Uploaded as a part of Release Process
Unknown file formatEXT TopicVarsPlugin_installer r2 r1 manage 3.4 K 2008-12-12 - 12:46 SopanShewale Installer Script, Uploaded as a part of Release Process
Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r19 - 2008-12-12 - SopanShewale
 
  • 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-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.