--- /Volumes/data/Documents/Projects_Arthur/TWiki Subversion/twiki/lib/TWiki/Render.org.pm Thu Sep 16 19:07:11 2004 +++ /Volumes/data/Documents/Projects_Arthur/TWiki Subversion/twiki/lib/TWiki/Render.pm Thu Sep 16 23:04:43 2004 @@ -107,15 +107,19 @@ my $prefix = ""; my $suffix = ""; my $usesep = ""; - + my $format = ""; + my $formfield = ""; + if( $args ) { $dontRecurse = TWiki::extractNameValuePair( $args, "dontrecurse" ); $noWebHome = TWiki::extractNameValuePair( $args, "nowebhome" ); $prefix = TWiki::extractNameValuePair( $args, "prefix" ); $suffix = TWiki::extractNameValuePair( $args, "suffix" ); $usesep = TWiki::extractNameValuePair( $args, "separator" ); + $format = TWiki::extractNameValuePair( $args, "format" ); + $formfield = TWiki::extractNameValuePair( $args, "formfield" ); } - + if( ! $usesep ) { $usesep = " > "; } @@ -125,7 +129,7 @@ my $sep = ""; my $cWeb = $web; - + while( 1 ) { my %parent = $meta->findOne( "TOPICPARENT" ); if( %parent ) { @@ -139,7 +143,18 @@ if( $noWebHome && ( $pTopic eq $mainTopicname ) ) { last; # exclude "WebHome" } - $text = "[[$pWeb.$pTopic][$pTopic]]$sep$text"; + if ($format) { + my $formattedtext = $format; + if ($formfield ne "") { + my $formfieldtext = getFormField($pWeb, $pTopic, $formfield); + $formattedtext =~ s/\$formfield/$formfieldtext/geos; + } + $formattedtext =~ s/\$topic/$pTopic/geos; + $formattedtext =~ s/\$web/$pWeb/geos; + $text = "$formattedtext$text"; + } else { + $text = "[[$pWeb.$pTopic][$pTopic]]$sep$text"; + } $sep = $usesep; if( $dontRecurse || ! $name ) { last; @@ -170,6 +185,11 @@ $text .= $suffix; } + if ($formfield ne "") { + my $formfieldtext = getFormField($web, $topic, $formfield); + $text =~ s/\$formfield/$formfieldtext/geos; + } + return $text; }