This was really helpfull, thank you very much,
regards Seba On 29 mar., 20:44, Eric Shulman <[email protected]> wrote: > > I defined this button as: <html><a > > href="javascript:location.reload(true)"><b>Home</b></a></html> and > > placed it in the MainMenu. > > Using 'location.reload(...)' is not a good idea. As written, pressing > your "Home" link would reload the entire document into the browser, > rather than merely closing all current tiddlers and re-opening the > initial default ones. > > If you have made changes to the current document, those changes would > be discarded (though you would receive a warning first). > > Fortunately, SinglePageModePlugin will automatically 'step aside' when > certain TW core functions are invoked. Among these core functions > are: > story.closeAllTiddlers(); > and > restart(); > > These two functions, when invoked from your command link, will do > exactly what they say: close all the tiddlers that are currently > displayed, and then restore the starting display (i.e., the *two* > default tiddlers). > > Thus: > > <html><a href="javascript:story.closeAllTiddlers(); restart();">Home</ > a></html> > > Note: rather than using HTML to define the 'onclick' command link, you > could install: > http://www.TiddlyTools.com/#InlineJavascriptPlugin > which adds support for embedding <script>....</script> blocks within > your tiddler content. > > To create an 'onclick' command, use the plugin's label="..." option, > like this: > > <script label="Home"> > story.closeAllTiddlers(); restart(); > </script> > > enjoy, > -e > Eric Shulman > TiddlyTools / ELS Design Studios -- 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.

