diff --git a/data/System/VarTOPICRECURSE.txt b/data/System/VarTOPICRECURSE.txt index d1f46f8..a69444f 100644 --- a/data/System/VarTOPICRECURSE.txt +++ b/data/System/VarTOPICRECURSE.txt @@ -14,6 +14,8 @@ | =header="..."= %BR% \ =footer="..."= | Custom format results: see [[FormattedSearch]] for usage & examples | =*Search: '$rootquery'*$n= %BR% =*Total: $ntopics*= | | =format="..."= %BR% \ + | =branchheader="..."= %BR% \ + =branchfooter="..."= | Custom format results: see [[FormattedSearch]] for usage & examples | | =formatbranch="..."= %BR% \ =formatleaf="..."= | Custom format results: see [[FormattedSearch]] for usage & examples; "branch" format is for nodes which have descendents; "leaf" format is for terminating nodes for which there are no others below. | =$indent* [[$web.$topic][$topic]]= | | =separator="..."= | Separator _between_ search hits. See [[#FormatTokens]] | =$n= | diff --git a/lib/Foswiki/Plugins/TopicRecursePlugin/Core.pm b/lib/Foswiki/Plugins/TopicRecursePlugin/Core.pm index efbe522..e203971 100644 --- a/lib/Foswiki/Plugins/TopicRecursePlugin/Core.pm +++ b/lib/Foswiki/Plugins/TopicRecursePlugin/Core.pm @@ -62,7 +62,7 @@ sub TOPICRECURSE { writeDebug( "rootNode: $rootNode->{webtopic}", 'TOPICRECURSE', 4 ); my $spec = extractParams( $params, - qw(header format formatbranch formatleaf separator footer), + qw(header format formatbranch formatleaf separator footer branchheader branchfooter), qw(nodelimit depthlimit breadthlimit) ); my @renderednodes = formatNodes( $rootNode, $spec ); @@ -96,7 +96,7 @@ sub formatNodes { my $result = renderNode( $node, $spec->{formatbranch} ); if ( not $node->isRoot() ) { - push( @renderednodes, $result ); + push( @renderednodes, $spec->{branchheader}.$result.$spec->{branchfooter} ); } } else {