r4 - 20 Aug 2004 - 08:22:35 - CrawfordCurrieYou are here: TWiki >  Codev Web > PassedInTopicTemplateOverridesDefault
Tags:
, create new tag
Against the current alpha - without this a passed in template gets overridden by the default, making the topictopic parameter useless in many cases.

Index: lib/TWiki/UI/Edit.pm
===================================================================
RCS file: /cvsroot/twiki/twiki/lib/TWiki/UI/Edit.pm,v
retrieving revision 1.1
diff -u -r1.1 Edit.pm
--- lib/TWiki/UI/Edit.pm        11 Apr 2004 05:28:51 -0000      1.1
+++ lib/TWiki/UI/Edit.pm        12 Apr 2004 11:13:48 -0000
@@ -125,9 +125,9 @@
         $templateWeb   = $1;
         $templateTopic = $2;
       }
+
       ( $meta, $text ) = &TWiki::Store::readTopic( $templateWeb, $templateTopic );
-    }
-    if( ! $text ) {
+    } elsif( ! $text ) {
       ( $meta, $text ) = &TWiki::Store::readTemplateTopic( "WebTopicEditTemplate" );
     }
     $extra = "(not exist)";

-- MartinCleaver - 12 Apr 2004

Looks simple enough. Will commit shortly if nobody sees anything wrong with doing so.

-- WalterMundt - 20 Apr 2004

Committed.

-- WalterMundt - 28 Apr 2004

 
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