Lets say you have a WebDav server. Actually, you probably don't have a WebDav server, but you have an FTP server. (Lets also say that you have MS Windows) Okay so you can login, upload the TiddlyWiki files, and have somewhere where others can view yoursweet site, right?
Now lets say that you want to open you TiddlyWiki file from your server and edit it like its a local file within your browser. Impossible? Sure. Now, here's how you can do the impossible:
The solution is Novell NetDrive (5 MB). I found it here: http://www.acs.uwosh.edu/novell/netdrive.htm You can Google it to download also, its free and works great (at least it has for the full ten minutes that I've used it ).
Install it and run it. It will allow you to map a webdav folder or an ftp site as a local drive. Let me repeat this (as it is pretty cool)
Map an FTP server as local drive.
Map a WebDav server as local drive.
Then, you can just drag your TiddlyWiki over, open it in your browser and edit it. Nice? Right. Very. Now follow this link and show your gratitude: http://tiddlywiki.com/#ThankYou
(Or just share the info and help others along the way)
Before we attempt to rearrange the page's layout, it is important to understand the page's structure. What is the page's structure? Think of a tree. The base element for a web page is the HTML element, like the trunk of a tree. Many elements branch out of the HTML element and even more elements branch out of those elements. So the page's structure branches out like a tree. Got it?
Now the elements that we are concerned with are the MainMenu and Sidebar. Here's how they sit in TiddlyWiki:
* * Sidebar
* * * SidebarOptions
* * * SidebarTabs
* * mainMenu
* * DisplayArea (where the tiddler's are)
var sidebar = document.getElementById('sidebar');
This 'grabs' the sidebar then grabs the mainMenu element and moves it to be before the sidebarOptions element. Save your TiddlyWiki file and refresh it. This will execute the new HTML Structure tiddler and rearrange the page structure. Now the page's structure looks like this (notice where the mainMenu has moved to):
** DisplayArea (where the tiddler's are)
You may be scratching your head wondering why we need to do anything else. In the TiddlyWiki the mainMenu is overlapping the sidebar and its still on the wrong side of the page. We'll fix it with CSS.
CSS rules allow you to change how the page displays. They're pretty easy to understand once you see them written out. We'll just add a few rules that undo the default TiddlyWiki styles.
Create a tiddler named 'StyleSheet' and add the following rules:
The first rule turns off a 'position: absolute;' rule. Absolute positioning is what make the mainMenu overlap the sidebar. 'Static' tells the sidebar to move on down and display after the mainMenu.
The second rule tells the sidebar to be zero pixels from the left side of the screen. It was set at 'right:0;' by TiddlyWiki before.
The final rule is actually not necessary but once we move the sidebar to the left side of the screen we want to let the tiddler's fill in the empty area again. So we remove the displayArea's right margin.
To keep the TiddlyWiki useable you'll probably want to keep the mainMenu realatively short. Next time I'll show you how to make your mainMenu horizontal and part of the header.