create new tag
, view all tags


I have a TWiki set up, and when a new topic is created, the user can select one of several different templates to help structure different types of documents. However if a new topic is created by clicking on a ? after a WikiWord, they start creating the new Topic in the default template. Is there any way to direct the browser to the appropriate webs WebTopicViewTemplate instead of WebTopicEditTemplate.


-- TomMcMillen - 08 Nov 2001


I've worked this one out myself now. I've changed line 1690 in TWiki.pm to read

instead of

That does the trick. Although it may be nice if this could be set from a TWiki Variable at some point in the future.

-- TomMcMillen - 09 Nov 2001

Here's an easier way, based on above, but using a variable. Edit TWikiPreferences to change NEWLINKFORMAT to:

* Set NEWLINKFORMAT = $text<A }%="" topic="" this="" create="" title="%MAKETEXT{" rel="nofollow" ?topic="$topic"" $web="" view="" href="%SCRIPTURLPATH%7B">?

(You may have to open this page in the editor to see the correct text to use.) Instead of the editor, you get an error page that prompts the user to search for similar pages, or to create it (via another page, which does prompt for templates).

-- ClifKussmaul - 06 Apr 2008

Above NEWLINKFORMAT seems to be garbled.

-- PeterThoeny - 06 Apr 2008

Based on the above NEWLINKFORMAT suggestion, I modified the variable's settings in TWikiPreferences so that clicking on the ? takes the user to the WebCreateNewTopic page so that he/she can pick the appropriate parent and/or topic template.

The NEWLINKFORMAT is set as follows:

<span class="twikiNewLink">$text<a href="%SCRIPTURLPATH{"view"}%/$web/$topic?create=on&newtopic=$topic&template=WebCreateNewTopic&topicparent=">?</a></span>

-- GarySprague - 18 Jun 2008

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2008-06-18 - GarySprague
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.