Hi Dave, Good you asked for a Home button; it is one of my favourites as well but I didn't know how to do it. @Stephan: Thanks for the code.
The thing I learned is how to style it. I updated my guide for a toolbar in a top menu with a Home button; look there for the details [1], [2] or [3]. In short: 1) To replace the Home button with an icon, you need to replace 'Home' in Stephan's code (at the bottom) by transcluding an icon. 2) You need to add the class 'btn-invisible' to Stephan's button definition (at the top) to remove the button shape. Cheers, Ton [1] https://dl.dropboxusercontent.com/u/2638511/TW5_test.htm [2] http://five.tiddlywiki.com/ (Community) [3] http://www.giffmex.org/tw5mall.htm (Page layout) On Monday, November 4, 2013 12:44:27 AM UTC+1, David Gifford wrote: > > Cool! Works well. Just curious how to restyle it. > > > On Sun, Nov 3, 2013 at 5:37 PM, Stephan Hradek > <[email protected]<javascript:> > > wrote: > >> Tested it. >> >> [[Homebutton]] >> <html><button onclick=" >> var defaultTiddlersTitle = '$:/DefaultTiddlers', >> defaultTiddlersTiddler = $tw.wiki.getTiddler(defaultTiddlersTitle), >> defaultTiddlers = []; >> if(defaultTiddlersTiddler) { >> defaultTiddlers = >> $tw.wiki.filterTiddlers(defaultTiddlersTiddler.fields.text); >> } >> var storyTitle = '$:/StoryList', >> story = []; >> for(var t=0; t<defaultTiddlers.length; t++) { >> story[t] = defaultTiddlers[t]; >> } >> $tw.wiki.addTiddler({title: storyTitle, text: '', list: story},$tw.wiki. >> getModificationFields()); >> return false; >> ">Home</button></html> >> >> And it seems to work. >> >> Include {{Homebutton}} whereever you want one. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "TiddlyWiki" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/tiddlywiki/nsECiXqk7fw/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/tiddlywiki. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > David Gifford > Christian Reformed World Missions, Mexico City > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/groups/opt_out.

