Example of ToolbarCommands::CollapsedToolbar

145 views
Skip to first unread message

Mark S.

unread,
Aug 28, 2012, 12:16:16 PM8/28/12
to tiddl...@googlegroups.com
The CollapseTiddlers macro apparently needs a special toolbar set up for it. Unfortunately, there isn't an example provided, and the one from tiddlytools.com is packed with references to other plugins.

Does anyone have a stripped down version of the toolbar?

Thanks!
Mark

Eric Shulman

unread,
Aug 28, 2012, 1:31:36 PM8/28/12
to TiddlyWiki
The plugin generates a default (shadow) version of CollapsedTemplate
that directly defines a 'minimal' standard toolbar using:
----------------
<div class='toolbar' macro='toolbar expandTiddler collapseOthers
closeTiddler closeOthers +editTiddler permalink references jump'></div>
\
<div class='title' macro='view title'></div>\
----------------

TiddlyTools.com contains a customized CollapsedTemplate that overrides
the default shadow definition:
----------------
<span class='toolbar' macro='toolbar
[[ToolbarCommands::CollapsedToolbar]]'></span>
<span class='title'>
<span class='floatleft' macro='tiddlerIcons' style='cursor:auto !
important;'></span>
<span macro='view title'></span>
</span>
<div class='tagClear'></div>
----------------
which references [[ToolbarCommands::CollapsedToolbar]], rather than
directly embedding the toolbar commands in the template. Of course,
as you've noted, the ToolbarCommands definition for TiddlyTools is
highly-customized and contains specific references to other plugins.

I apologize for the current example/usage info in the Plugin... it is
obviously insufficient, and I need to re-write the documentation.

In any event, for your purposes, just copy the list of toolbar
commands from the shadow definition and paste it into the
ToolbarCommands::CollapsedToolbar slice. These are the commands to
paste:

+expandTiddler collapseOthers closeTiddler closeOthers editTiddler
permalink references jump

Note one minor adjustment: the "+" prefix should be moved from
"editTiddler" to "expandTiddler", so that double-clicking on a
collapsed ("folded") tiddler expands ("unfolds") it, rather than
editing it.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact

Mark S.

unread,
Aug 28, 2012, 1:45:52 PM8/28/12
to tiddl...@googlegroups.com
Hi Eric,

I see what I did wrong. I didn't know there would be a shadow template, and I imported yours ... which of course didn't work right because it was expecting other macros.

I deleted the Collapse template and now its working fine.

Thanks again!
Mark
Reply all
Reply to author
Forward
0 new messages