SID-00928: How to set a new topic template for creating topics
| Status: |
Answered |
TWiki version: |
5.0.0 |
Perl version: |
|
| Category: |
CategoryTemplates |
Server OS: |
cent0S 5 |
Last update: |
13 years ago |
I have been trying to figure out how to use a template to pre fill a new topic that is being created by clicking a wikilink from and exsiting topic.
I only want new topics created from this specific topic to get the format so I can't edit the global edittopictemplate.
Is there a way to define that new links from a topic get a certain template?
--
ScottGutman - 2010-08-05
Discussion and Answer
You can create a specific topic create link with a parameter to set a template. Example:
[[https://twiki.org/cgi-bin/edit/Support/?topic=FooBar;onlynewtopic=1;templatetopic=MyCustomTemplate][Create FooBar topic]]
If you want that a specific template is used in a particular web, create a
WebTopicEditTemplate topic in that web. It overloads the default one defined in the TWiki web.
See details at
TWikiTemplates,
TWikiScripts
--
PeterThoeny - 2010-08-05
You can also install the
ChildTopicTemplatePlugin, which I just made more robust & updated for TWiki-5.0.
--
PeterThoeny - 2010-08-06
thank you,
ChildTopicTemplatePlugin is exactly what i was looking for and works perfectly!!
--
ScottGutman - 2010-08-09
I am glad it worked out. Please consider contributing back to the TWiki community. Open source is about using and giving back.
--
PeterThoeny - 2010-08-10
Small error in example above:
topictemplate --> templatetopic
--
JanRiis - 2012-10-26
Thanks Jan, example is fixed now.
--
PeterThoeny - 2012-10-26
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.