sihorton / appjs-TiddlyWiki

TiddlyWiki plugin for AppJS
5 stars 0 forks source link

Multiple TiddlyWikis #14

Closed cawoodm closed 11 years ago

cawoodm commented 11 years ago

Would you consider supporting multiple .html files inside the same folder (AppJS package)? I would like to use 4 or 5 different TWs without duplicating app. Not sure how this should work - ideally (windows) one could make various shortcuts to TiddlyWiki.exe which pass a parameter like TiddlyWiki.exe -f mytw1.html to run mytw1.html. Or you could offer a menu at startup or some kind of global top tabset which switches (iframe) which TW is displayed...

sihorton commented 11 years ago

It should already support multiple TiddlyWikis without any special changes. Just add additional files for each TiddlyWiki. I would suggest that you then replace index.html with a simple html page, you can then have normal html links to each wiki, e.g. <a href="wikiName.html">wikiName</a> assuming you have a TiddlyWiki file "wikiName.html" in the directory.

Do that first to verify that you can navigate between the various TiddlyWikis then you can add whatever fancy html / javascript you want to make a nice application that can switch between the TiddlyWikis.

Try that out and let me know how it goes for you!

/Simon

cawoodm commented 11 years ago

Pleasantly surprised and mighty pleased - thanks!

Here's a sample index.html which gives you a kind of "global tabs" feature:

<body>
    <div><a target="main" href="tw1.html">Wiki 1</a> | <a target="main" href="tw2.html">Wiki 2</a></div>
    <iframe frameborder="0" name="main" width="100%" height="95%"></iframe>
</body>
sihorton commented 11 years ago

Great glad it works for you! Nice solution since it means you can have it looking however you want.

I can add a wiki page about how to do this.

sihorton commented 11 years ago

One thing I just thought, in order to get the TiddlyWiki to save using AppJS I use a plugin, this means you should copy the original index.html TiddlyWiki or if you create a new TiddlyWiki add the plugin so that saving works for your additional pages.