Refresh tiddler using tiddler menu option

11 views
Skip to first unread message

Anthony Muscio

unread,
Oct 2, 2008, 9:20:13 PM10/2/08
to TiddlyWiki
Hi,

Can anyone assist me on this one, I have spent some time googling this
but never find what I am actually after and would have thought it an
important tool.

Requirement:
A Tiddler menu based "refresh tiddler" item.

Background
I have a complex tiddler (Master) that contains a list of todo items
using Tabs, <part>, For Each Tiddler (FET), and <<tiddler
includedTiddler>> to build a nice quick reference access to my tasks.
However if I open and delete a tiddler (task) modify it's tags such
that it should not display in the FET list I have to refresh the
display. For some reason refreshTiddler plugin is not working on this
Master tiddler and its children, so I have to use the refreshTiddler
macro embedded in the tiddler content. This works however I would like
to move this functionality into the tiddler menu so I do not need to
include it all the time in other "master tiddlers" or tiddlers with
FET.

Thanks in advance
TonyM

Eric Shulman

unread,
Oct 2, 2008, 9:30:53 PM10/2/08
to TiddlyWiki
> A Tiddler menu based "refresh tiddler" item.

You can do this with a bit of inline javascript.

First, create a tiddler, e.g. [[RefreshTiddlerCommand]], containing
this 'onclick' script:
------------------
<script label="refresh" title="redisplay the contents of this
tiddler">
story.refreshTiddler(story.findContainingTiddler(place).getAttribute("tiddler"),null,true);
</script>
------------------

Then, to add this script to the tiddler toolbar in the ViewTemplate...
find this line:

<div class='toolbar' macro='toolbar
[[ToolbarCommands::ViewToolbar]]'></div>

and add this line either before or afterward:

<span class='toolbar' macro='tiddler RefreshCommand'></span>

That should do it. A "refresh" command should appear in the tiddler
toolbar.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Anthony Muscio

unread,
Oct 2, 2008, 11:36:39 PM10/2/08
to Tiddl...@googlegroups.com
Thanks Eric,

I can see how this will work however I have found I have been trapped by the path I have followed;
I am using a TW 2.4.1 which was upgraded from an earlyer version, I am using some MPTW code which includes view and edit templates and have created additional taggedTemplates. To further complicate the matter I have created subtemplates eg viewStatusTemplate which is placed inside the taggedtemplates.

I noticed how the toolbar commands are now managed through use of the ToolbarCommands shadow tiddler and the table within it however I am not sure how to re-engineer the templates to use this new feature.

If it is too complex don't bother explaining, I don't want to waste your time, I should possibly just rebuild my PIMwiki. Otherwise if there are a few simple steps I would like to re-engeneer the toolbars. A High level description to start may help.

Thanks in advance.
TonyM
--
TonyM

If you have not found an easy way to do it with TiddlyWiki, you have missed something.
www.tiddlywiki.com

Reply all
Reply to author
Forward
0 new messages