Tags:
create new tag
, view all tags
With this patch each topic can have its own template. wiki::readTemplate() has been modified to search for the following templates (in this order):
  1. $templateDir/$webName/$name.$topic.tmpl
  2. $templateDir/$webName/$name.tmpl
  3. $templateDir/$name.$topic.tmpl
  4. $templateDir/$name.tmpl
$name is the name of the script, for example view . The current TWiki version uses steps 2 and 4.

This enhancement gives you lots of flexibility to use 'normal' topics for special (systems) functions, especially with the new & improved inline search. Another example is a separate page for creating new topics; bin/edit/Test?topic=new uses edit.new.tmp which has an entryfield for the new topicname in addition to the textbox.

I'm using this feature for the edit and view scripts, so the relevant wiki::readTemplate() call in those files has been changed (additional argument). It's perfectly fine to keep calling wiki::readTemplate() with only one argument since the new argument defaults to an empty string, thus behaving just like before (only step 2 and 4, see above).

This patch is almost a necessity if one plans to use the also proposed TopicDropdownbox.

related links: InterfaceClutter

-- PeterFokkinga - 15 May 2000

Commited to cvs on 22 May 2000 NZST.

-- NicholasLee - 21 May 2000

Modified status to "done" -- this feature is in the Dec 2000 release, and it really works well.

-- StanleyKnutson - 26 Jan 2002

Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatdiff edit.diff manage 0.6 K 2000-05-15 - 20:54 PeterFokkinga diff against 20000501 release
Unknown file formatdiff view.diff manage 0.6 K 2000-05-15 - 20:53 PeterFokkinga diff against 20000501 release
Unknown file formatdiff wiki.pm.diff manage 1.3 K 2000-05-15 - 20:53 PeterFokkinga diff against 20000501 release
Topic revision: r5 - 2004-11-03 - RafaelAlvarez
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.