r4 - 06 Apr 2008 - 22:19:35 - PeterThoenyYou are here: TWiki >  Support Web > CreateNewTopic
Tags:
, create new tag

Question

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.

Thanks.

-- TomMcMillen - 08 Nov 2001

Answer

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

/view$scriptSuffix/$theWeb/?topic=$theTopic 
instead of
/edit$scriptSuffix/$theWeb/$theTopic?topicparent=

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

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo