Tags:
create new tag
, view all tags
Following moved from AddParentVariableToTemplate

Here's a patch for TWikiBetaRelease2004x05x07; I've been using it for AthensRelease quite some time:

--- /var/tmp/twiki20040507beta/lib/TWiki/Render.pm      Sat May  1 08:53:36 2004
+++ ./Render.pm Fri Jun  4 11:25:39 2004
@@ -87,6 +87,7 @@
     my $prefix = "";
     my $suffix = "";
     my $usesep = "";
+    my $raw = "";
 
     if( $args ) {
        $dontRecurse = TWiki::extractNameValuePair( $args, "dontrecurse" );
@@ -94,6 +95,7 @@
        $prefix =      TWiki::extractNameValuePair( $args, "prefix" );
        $suffix =      TWiki::extractNameValuePair( $args, "suffix" );
        $usesep =      TWiki::extractNameValuePair( $args, "separator" );
+       $raw =         TWiki::extractNameValuePair( $args, "raw" );
     }
 
     if( ! $usesep ) {
@@ -110,6 +112,7 @@
         my %parent = $meta->findOne( %_Q__Q_% );
         if( %parent ) {
             my $name = $parent{"name"};
+    return $name       if $raw;
             my $pWeb = $cWeb;
             my $pTopic = $name;
             if( $name =~ /^(.*)\.(.*)$/ ) {
This returns the unformatted, raw parent value if you type %META{"parent" raw="on"}%. Any suggestion for an option name better than raw="on"?

-- PeterKlausner - 04 Jun 2004

See also related FormattedSearchWithParentTopic, which is implemented in CairoRelease.

-- PeterThoeny - 27 Jul 2004

Better to make the syntax consistent with other variables. Possibly a format parameter? Deferring to DakarRelease.

-- PeterThoeny - 04 Aug 2004

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2006-04-29 - SamHasler
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.