TopicsTemplate1 uses the variable: "$1" - so it can be uses like this:
<<tiddler TopicsTemplate1 with: ...
TopicsTemplate2 gets the tiddlertitle from the tiddler in which it is
contained like this:
{{story.findContainingTiddler (place).getAttribute ('tiddler');}}

Both setup for comparison:
MainMenu w TopicsTemplate1:
<<forEachTiddler where 'tiddler.tags.contains("Topics")' write
 '"<<tiddler TopicsTemplate1 with: [["+tiddler.title+"]]$))"'>>
TopicsTemplate1:
<<treeview2 "$1" "treeview-gray" 'collapsed: true,
antisesame: "closed", animated: "fast", persist: "cookie", cookieId:
"Topics"'>>
TopicsViewTemplate w TopicsTemplate2
<!--{{{-->
<div class='toolbar' macro='toolbar
[[ToolbarCommands::ViewToolbar]]'><span style='padding-right: 1.8em;'
macro='newHere label:"*create subtopic notes*"'></span><span
style="color:#ccc;"></span><span style="padding-right:1.8em;"
macro='tagger'></span ></div></div>
<span class='title' macro='view title'></span>

<div class='viewer' macro='view text wikified'><span macro='tiddler
TopicsTemplate2'></span></div>
<div class='tagClear'></div>
<!--}}}-->

TopicsTemplate2:
<<treeview2 {{story.findContainingTiddler
(place).getAttribute
('tiddler');}} "treeview-gray" 'collapsed: true,
 antisesame: "closed", animated: "fast", persist: "cookie", cookieId:
 "Topics"'>>

Regards Måns Mårtensson

On 26 Sep., 04:03, Måns <[email protected]> wrote:
> Hi Dave
>
> (As I remember ... )
> If you make a tiddler titled: "Topics" and tag it: "closed" - The tree
> is folded upon startup.
> TopicsTemplate2 is for displaying a tree in a tiddler based on the
> tiddlers title - it's written into the viewtemplate.
> TopicsTemplate1 is just made for use in the MainMenu - to show a tree
> for all tiddlers tagged: Topics..
>
> Regards Måns Mårtensson
>
> On 26 Sep., 01:56, "Dave Gifford -http://www.giffmex.org/";
>
>
>
> <[email protected]> wrote:
> > Hi all,
>
> > I really want the Treeview index in NoteStorm to be collapsed by
> > default whenever I open the file. But currently the opposite is true,
> > even though the macros in TopicsTemplate1 and 2 are "collapsed: true."
>
> > Can someone who knows more about the options for Treeview give me the
> > code necessary to force NoteStorm's treeview menu closed until I
> > manually open it?
>
> > Also (question for Mans), why is there a TopicsTemplate1 and a
> > TopicsTemplate2? Is the first one made unnecessary by the second one?
> > Or are both needed?
>
> > Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to