Tags:
create new tag
view all tags

SID-00928: How to set a new topic template for creating topics

Status: Answered 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 smile

-- JanRiis - 2012-10-26

Thanks Jan, example is fixed now.

-- PeterThoeny - 2012-10-26

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title How to set a new topic template for creating topics
SupportCategory CategoryTemplates
TWiki version 5.0.0
Server OS cent0S 5
Web server apache
Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2012-10-26 - 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.