Hi All
I previously managed to get something like this working, in each
tiddler that I wanted listed in treeview,,,I inserted a bit of script
that defined a config.options.txtMain=tiddler.title;.......and then
had the treeview macro in MainMenu reference
{{config.options.txtMain}}.....a bit cumbersome but works.....
The code offered in this discussion is much cleaner though...
I changed the above code to read -
<<treeview2 {{story.findContainingTiddler(place).getAttribute
('tiddler');}} "filetree" 'collapsed: false,
antisesame: "closed", animated: "fast", persist: "cookie", cookieId:
{{story.findContainingTiddler(place).getAttribute('tiddler')+"-
id";}}' >>
...gives the error message "Unable to use your treeview configuration
settings!" .... AND does generate the treeview as requested.
On testing further..the part that is triggering the error is the
cookield code....if you remove the coding there and just put
"cookiieid" for example it works perfectly.......so
...why does the code evaluate correctly in the first instance and not
the second instance
....is it absolutely necessary for the the treeviewmacro to hace
cookieId set to different value each time!!!
Skye
On 22 Ago, 15:24, Måns <[email protected]> wrote:
> Hi Mark
>
> Exactly -
> I would like to insert tiddler.title as the tag - therefore the
> template idea..
>
> YS Måns Mårtensson
>
> On 22 Aug., 19:14, "Markk S." <[email protected]> wrote:
>
> > Oh, the plugin needs an actual tag to use as the root. If that tag
> > doesn't exist anywhere, that would explain your error.
>
> > Mark
>
> > On Aug 22, 8:51 am, Måns <[email protected]> wrote:
>
> > > Hi Mark
>
> > > Thanks for giving it a shot ....
> > > Unfortunately it doesn't work for me.
> > > I get: <<treeview2>>:
> > > TypeError: Cannot read property 'tags' of null
>
> > > Maybe you and FrD are both right - maybe it's just the plugin, which
> > > doesn't support fetching fieldname tiddler.title...
>
> > > I don't know - thanks for trying though..
>
> > > YS Måns Mårtensson
>
> > > On 22 Aug., 18:42, "Markk S." <[email protected]> wrote:
>
> > > > Maybe try:
>
> > > > <<treeview2 {{story.findContainingTiddler(place).getAttribute
> > > > ('tiddler')+"filetree";}} 'collapsed: false,
> > > > antisesame: "closed", animated: "fast", persist: "cookie", cookieId:
> > > > {{story.findContainingTiddler(place).getAttribute('tiddler')+"-
> > > > id";}}' >>
>
> > > > I did this too fast. There might be some syntax error ... but this
> > > > should be close.
>
> > > > -- Mark
>
> > > > On Aug 22, 2:42 am, Måns <[email protected]> wrote:
>
> > > > > Hi TwWizards
>
> > > > > I've tried to make a template that generates a treeview based on the
> > > > > tiddler title.
> > > > > However I cannot figure what to write for the plugin to fetch the
> > > > > title - I've tried:
> > > > > <<treeview2 "+tiddler.title+" "filetree" 'collapsed: false,
> > > > > antisesame: "closed", animated: "fast", persist: "cookie", cookieId:
> > > > > "+tiddler.title+-ID"' >>
>
> > > > > Which doesn't work...
>
> > > > > Does someone know the correct syntax - or can't you use it in a
> > > > > template??
>
> > > > > YS Måns Mårtensson
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---