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