I've attached a patch which implements a new parameter leveltoken and an associated format pseudo-variable $leveltoken.

$leveltoken is just like the levelprefix parameter, except that one can use it within the format output. Why is this useful? I'm generating a table from the topic tree and want to provide a visual clue of the nesting of topics. I can't use levelprefix for this as I can't place it where I need inside the format. For example, I'd like to introduce appropriate spacing in front of a topic name to show it's level. Here's what my proposed enhancement looks like:

%TREEVIEW{
    formatting="outline"
    includetopic="Task0*"
    header="| *Topic* | *Parent* | *level* | *count* | *index* | *outnum* |"
    format="| $leveltoken$topic | $parent | $level | $count | $index | $outnum |"
    nodiv="2"
    leveltoken=" "
}%

And here's the rendered output:

table.png

-- DiabJerius - 20 Jan 2010

Excellent addition. I don't use this plugin so much anymore, and lack the time to take responsibility for this patch. Maybe somebody else does.

Do you have svn commit access? If not, you should request it at Development.RequestAccessToSubversion. We can help you through making the change and uploading a new release of TreePlugin on IRC

TreePlugin could really use some TLC!

-- PaulHarvey - 27 Jan 2010
 

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads