Skip to content

Commit

Permalink
Item10760: added branchfooter and branchheader parameters to the topi…
Browse files Browse the repository at this point in the history
…crecurse macro

git-svn-id: http://svn.foswiki.org/trunk/TopicRecursePlugin@11712 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
TemiVarghese authored and TemiVarghese committed May 18, 2011
1 parent c0b63fa commit 061c804
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions data/System/VarTOPICRECURSE.txt
Expand Up @@ -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 &amp; examples; "branch" format is for nodes which have descendents; "leaf" format is for terminating nodes for which there are no others below. | =$indent* [<nop>[$web.<nop>$topic][$topic]]= |
| =separator="..."= | Separator _between_ search hits. See [[#FormatTokens]] | =$n= |
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/TopicRecursePlugin/Core.pm
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 061c804

Please sign in to comment.