information_design1Add my vote for this tag template_system1Add my vote for this tag workflow1Add my vote for this tag create new tag
, view all tags


Specify a template when creating a child topic via red-link


This plugin allows you to specify in a topic what template should be used when a child topic is created via TWiki's red-link. A number of different templates can be specified throughout a topic to allow different child topics to be created in different sections of the parent.

Syntax Rules

  • Write the command %CHILDTOPICTEMPLATE{ "NameOfTopicTemplate" }% anywhere in your text.
  • All subsequent red-linked WikiWords will be created using the specified topic template.
  • Use %CHILDTOPICTEMPLATE{}% to remove the child topic template.
  • A topic can contain any number of CHILDTOPICTEMPLATE commands.


NewTestTopic1 -- this red-link uses the default template topic
%CHILDTOPICTEMPLATE{ "NewTopicTemplate" }% -- set custom template topic NewTopicTemplate
NewTestTopic2 -- this red-link uses template topic NewTopicTemplate
%CHILDTOPICTEMPLATE{}% -- disable custom template topic
NewTestTopic3 -- this red-link uses the default template topic again

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %CHILDTOPICTEMPLATEPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Specify a template when creating a child topic via red-link

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

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip ChildTopicTemplatePlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/ChildTopicTemplatePlugin.txt Plugin topic
    lib/TWiki/Plugins/ChildTopicTemplatePlugin.pm Plugin Perl module
  • Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
  • Test if the installation was successful:
    • NewChildTopicTemplateLinkTest1 -- red-link to topic using default template topic
    • %CHILDTOPICTEMPLATE{ "Plugins.ChildTopicTemplatePlugin" }% %CHILDTOPICTEMPLATE{ "Plugins.ChildTopicTemplatePlugin" }%
    • NewChildTopicTemplateLinkTest2 -- red-link to topic using "Plugins.ChildTopicTemplatePlugin" as template topic

Plugin Info

Plugin Author: TWiki:Main.DeanCording, TWiki:Main.ChristopherOezbek, TWiki:Main.PeterThoeny
Copyright: © 2004 TWiki:Main.DeanCording,
© 2004-2010 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 19323 (2010-08-05)
Change History:  
2010-08-05: TWikibug:Item6530 - use postRenderingHandler callback instead of endRenderingHandler; fixed link parsing for red-links; more robust parsing of CHILDTOPICTEMPLATE with parameters; doc enhancements; changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
28 Jun 2004: Added more robust handling of parameters -- TWiki:Main.ChristopherOezbek
10 Jun 2004: Fixed problem causing some pages (like Attach New File) to not render correctly
01 Jun 2004: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle 100%, FormattedSearch 100%, ChildTopicTemplatePlugin 99%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ChildTopicTemplatePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ChildTopicTemplatePluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ChildTopicTemplatePluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 ChildTopicTemplatePlugin.md5 r6 r5 r4 r3 r2 manage 0.2 K 2010-08-06 - 07:03 PeterThoeny  
Compressed Zip archivetgz ChildTopicTemplatePlugin.tgz r6 r5 r4 r3 r2 manage 4.4 K 2010-08-06 - 07:03 PeterThoeny  
Compressed Zip archivezip ChildTopicTemplatePlugin.zip r9 r8 r7 r6 r5 manage 5.9 K 2010-08-06 - 07:03 PeterThoeny  
Unknown file formatEXT ChildTopicTemplatePlugin_installer r2 r1 manage 3.4 K 2010-08-06 - 07:03 PeterThoeny  
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2013-10-16 - PeterThoeny
  • 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-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.